Applying Patch on Oracle Database in Oracle Cloud

On this post i will show how to apply patch on Oracle Database inside of Oracle Cloud.

1.) Choose your database

p1

2.) Checks the Avalilables Patches… On this case we have 1…

p2

3.) Before apply the patch you should execute the PreCheck option, in order to see if there is some issue…p3

For the first time I faced this issue during the Pre-Check

p4

Precheck failed due to incorrect Cloud tooling version and latest Cloud tooling update not available . “No applicable dbaastools rpms found” (Doc ID 2400143.1)

The Solution (If your DBAASTOOLS is older than 18.2.3.1.0):

[opc@db02 ~]$ sudo su –
[root@db02 ~]#
[root@db02 ~]#

[root@db02 ~]# wget https://storage.us2.oraclecloud.com/v1/dbcsswlibp-usoracle29538/dbaas_patch/18.2.3.1.0/180516/dbaastools.rpm

–2018-06-22 15:01:04–  https://storage.us2.oraclecloud.com/v1/dbcsswlibp-usoracle29538/dbaas_patch/18.2.3.1.0/180516/dbaastools.rpm

Resolving storage.us2.oraclecloud.com… 129.152.172.3, 129.152.172.4

Connecting to storage.us2.oraclecloud.com|129.152.172.3|:443… connected.

HTTP request sent, awaiting response… 200 OK

Length: 138209324 (132M) [application/octet-stream]

Saving to: “dbaastools.rpm”

 

100%[=========================================================================================================================================================================================>] 138,209,324 27.8M/s   in 6.1s

2018-06-22 15:01:11 (21.5 MB/s) – “dbaastools.rpm” saved [138209324/138209324]

[root@db02 ~]# ls

dbaastools.rpm  keylist

[root@db02 ~]# rpm -qpi ./dbaastools.rpm

Name        : dbaastools                   Relocations: (not relocatable)
Version     : 1.0                               Vendor: Oracle
Release     : 1+18.2.3.1.0_180516.0000      Build Date: Mon 14 May 2018 02:00:58 PM CEST
Install Date: (not installed)               Build Host: adc01bqu.us.oracle.com
Group       : Applications/Administrative   Source RPM: dbaastools-1.0-1+18.2.3.1.0_180516.0000.src.rpm

Size        : 143835544                        License: Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.

Signature   : (none)
Packager    : mmoteka
URL         : http://dbdev.us.oracle.com/
Summary     : DBAAS Tools
Description :
DBAAS Tools for Oracle Public Cloud

[root@db02 ~]# rpm -qa|grep -i dbaastools

dbaastools-1.0-1+18.2.3.0.0_180413.0807.x86_64

[root@db02 ~]# rpm -ev dbaastools-1.0-1+18.2.3.0.0_180413.0807.x86_64

[root@db02 ~]# rpm -ivh ./dbaastools.rpm

Preparing…                ########################################### [100%]   1:dbaastools             ########################################### [100%]

[root@db02 ~]# rpm -qa|grep -i dbaastools

dbaastools-1.0-1+18.2.3.1.0_180516.0000.x86_64

[root@db02 ~]# /var/opt/oracle/ocde/assistants/bkup/bkup

Starting BKUP

Logfile is /var/opt/oracle/log/bkup/bkup_2018-06-22_15:03:31.log
Config file is /var/opt/oracle/ocde/assistants/bkup/bkup.cfg
dbname: DB02
Dataguard configuration
Enabled: 0
Mode: PRIMARY
INFO : No backup strategy enabled.
Looking for previous configuration:
Directory : /home/oracle/bkup/DB02
-> obkup
-> Found: 1 files
-> Moving previous configuration to /home/oracle/bkup/DB02_20180622150342
No initial bkup of PFILE needed.
Common RMAN Config
Instantiating obkup
Instantiating dbcfg.spec
Updating Control File Record Keep Time
Enabling block change tracking
Updating RMAN defaults
INFO: Archivelog management enabled.
Adding entry to crontab
Accessing to your Database ID ..
The DBaaS instance database id is: 1726838203
Deleting unencrypted autobackups.

#### Completed Execution.

[root@db02 ~]#

After upgrade the RPM, apply the latest patch level for TOOLS ( If your DBAASTOOLS is >= 18.2.3.1.0, you can do direct to the command below):

dbaascli patch tools list

Execute Again the Pre-Check:

p5

The current Patch Level: Jan 2018

p6

Let’s Apply the Patch

p7.pngp8

Force apply patch Option:

If you want errors to be ignored during the patching operation, select the Force apply patch option. Then, click Patch.

If the Force apply patch option is selected, patch conflicts or errors discovered during the precheck stage of the patching operation are ignored and the patch will be applied (space permitting). If the option is not selected and conflicts or errors are discovered, the patch will not be applied.

https://docs.oracle.com/en/cloud/paas/database-dbaas-cloud/csdbi/apply-patch.html

p9

Follow the patching with ALERT.LOG

[oracle@db02 trace]$ pwd

/u01/app/oracle/diag/rdbms/db02/DB02/trace

[oracle@db02 trace]$ tail -1000f alert_DB02.log

Check also the log :

/u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/opatch/ opatch2018-06-22_16-11-16PM_1.log

p10

Checking again the status of the applied Patches….p11

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s