Tuesday, August 28, 2018

Upgrade dbaascli at Oracle Cloud Servers



Check Current Version of dbaascli

rpm -qa | grep -i dbaastools
dbaastools-1.0-1+17.3.3.0.0_170703.1410.x86_64

Check for Latest Release Version:

Executing command dbpatchm --run -list_tools -cli
/var/opt/oracle/patch/dbpatchm -list_tools -cli
Starting DBPATCHM
Logfile is /var/opt/oracle/log/dbpatchm/dbpatchm_2018-08-24_11:14:11.log
Config file is /var/opt/oracle/patch/dbpatchm.cfg

INFO: cdb is set to : yes
INFO: dbversion detected : 12102
INFO: patching type : psu

Patchid : 18.2.3.1.0_180523.0000
Patchid : 18.1.4.1.0_180523.0000
Patchid : 18.1.4.1.0_180525.0000
Patchid : 18.1.4.1.0_180530.0000
Patchid : 18.2.3.1.0_180530.0000
Patchid : 18.1.4.1.0_180606.0000
Patchid : 18.2.3.1.0_180606.0000
Patchid : 18.1.4.1.0_180613.0000
Patchid : 18.2.3.1.0_180613.0000
Patchid : 18.1.2.1.0_180613.0000
Patchid : 18.2.3.1.0_180620.0000
Patchid : 18.1.4.1.0_180627.0000
Patchid : 18.1.4.1.0_180704.0000
Patchid : 18.2.3.1.0_180704.0000
Patchid : 18.2.3.1.0_180711.0000
Patchid : 18.2.3.1.0_180716.0000
Patchid : 18.1.4.1.0_180718.0000
Patchid : 18.2.3.1.0_180718.0000
Patchid : 18.1.4.1.0_180725.0000
Patchid : 18.2.3.1.0_180725.0000
Patchid : 18.3.1.1.0_180725.0000
Patchid : 18.1.4.1.0_180801.0000
Patchid : 18.2.3.1.0_180801.0000
Patchid : 18.3.1.1.0_180801.0000
Patchid : 18.3.1.1.0_180822.0000
dbpatchm Execution completed


Apply Latest Release Patch:

dbaascli dbpatchm --run -toolsinst -rpmversion=18.3.1.1.0_180822.0000
DBAAS CLI version 1.0.0
Executing command dbpatchm --run -toolsinst -rpmversion=18.3.1.1.0_180822.0000 -cli
/var/opt/oracle/patch/dbpatchm -toolsinst -rpmversion=18.3.1.1.0_180822.0000 -cli

Starting DBPATCHM
Logfile is /var/opt/oracle/log/dbpatchm/dbpatchm_2018-08-24_11:18:31.log

WARN : Parameter toolsinst passed via cmdline is not a valid parameter. Please check the usage.
Config file is /var/opt/oracle/patch/dbpatchm.cfg

INFO: cdb is set to : yes
INFO: dbversion detected : 12102
INFO: patching type : psu

INFO: existing dbaastools version - dbaastools-1.0-1+17.3.3.0.0_170703.1410.x86_64

INFO: updated dbaastools rpm to - dbaastools-1.0-1+18.3.1.1.0_180822.0000.x86_64
dbpatchm Execution completed


Oracle DBCS instance patch issue

Error :

2018-08-24 15:23:05 - cmd took 0 seconds
2018-08-24 15:23:05 - WARN: you may need to cleanup/rollback/reset before retrying.
2018-08-24 15:23:05 - WARN: you may need to cleanup/rollback/reset before retrying.
 at /var/opt/oracle/patch/../perl_lib/DBAAS/Common.pm line 384
        Common::logdie('Common=HASH(0x2356bf0)', 'WARN: you may need to cleanup/rollback/reset before retrying. \x{a}') called at /var/opt/oracle/patch/dbpatchm line 3208
        eval {...} called at /var/opt/oracle/patch/dbpatchm line 3131
        main::preprocess_st() called at /var/opt/oracle/patch/dbpatchm line 661
2018-08-24 15:23:05 -
INFO: cstate updated for 184
Type  :quit<Enter>  to exit Vim 


Solution:  Connect to Server with root user and run below command.

Connect with opc user and switch to root su -s

dbaascli dbpatchm --run -cleanup
DBAAS CLI version 18.3.1.1.0
Executing command dbpatchm --run -cleanup -cli
/var/opt/oracle/patch/dbpatchm -cleanup -cli