AutoUpgrade tool now can be used for Database patching as well. lets explore this post .
In this Article , we will use AutoUpgrade to patch a 19c multitenant RAC database from 19.14 to 19.16.
Our Database environment:
Servers
19cracs2.localdomain
19cracs1.localdomain
19.14 Database home: /u01/app/oracle/product/19.3.0.0/dbhome_1
Currently database is using this database home.
Database name : hol19cts
I have installed another home and patched it with 19.16 patch. Below is the database home with 19.16 patch
19.16 Database home : /u01/app/oracle/product/19.16.0.0
Downloaded 19.16 patch set details: p34133642_190000_Linux-x86-64.zip
Downloaded latest Opatch : p6880880_190000_Linux-x86-64.zip
unzipped the above matches to /u01/software/19C_JULY_PSU
Download the latest AutoUpgrade tool : As per Oracle, we should always be using the latest version of AutoUpgrade tool . we can download it from the doc id, AutoUpgrade Tool (Doc ID 2485457.1)
Just like for the database upgrade, AutoUpgrade needs a confoguration file, for the patching also, AutoUpgrade tool need similar configuration file . for this Patching activity, I have created below configuration file.
[oracle@19cracs1 DBPATCH_1916]$ cat hol19cts_patch.cfg
global.autoupg_log_dir=/u01/software/19C_JULY_PSU/DBPATCH_1916
patch1.sid=hol19cts1
patch1.source_home=/u01/app/oracle/product/19.3.0.0/dbhome_1
patch1.target_home=/u01/app/oracle/product/19.16.0.0
patch1.drop_grp_after_upgrade=yes
[oracle@19cracs1 DBPATCH_1916]$
As you can see from above, the configuration file has source (current) database home and new home(with 19.16 patched) details . AutoUpgrade tool, creates the guarantee restore point before it upgrades/patches. We are instructing AutoUpgrade to drop the Guarantee restore point (with patch1.drop_grp_after_upgrade=yes) after the patching completes.
Run the AutoUpgrade in Analyze mode:
[oracle@19cracs1 DBPATCH_1916]$ $ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config hol19cts_patch.cfg -mode analyze
AutoUpgrade 22.5.221011 launched with default internal
options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 CDB(s) plus 2 PDB(s) will be analyzed
Type 'help' to list console commands
upg> lsj
+----+---------+---------+---------+-------+----------+-------+----------------------------+
|Job#| DB_NAME| STAGE|OPERATION|
STATUS|START_TIME|UPDATED|
MESSAGE|
+----+---------+---------+---------+-------+----------+-------+----------------------------+
100|hol19cts1|PRECHECKS|EXECUTING|RUNNING| 12:14:20| 2s ago|Loading database information|
+----+---------+---------+---------+-------+----------+-------+----------------------------+
Total jobs 1
upg> lsj
+----+---------+---------+---------+-------+----------+-------+----------------------------+
|Job#| DB_NAME| STAGE|OPERATION|
STATUS|START_TIME|UPDATED|
MESSAGE|
+----+---------+---------+---------+-------+----------+-------+----------------------------+| 100|hol19cts1|PRECHECKS|EXECUTING|RUNNING| 12:14:20| 8s ago|Loading database
information|
+----+---------+---------+---------+-------+----------+-------+----------------------------+
Total jobs 1
upg> Job 100 completed
------------------- Final Summary --------------------
Number of databases [ 1 ]
Jobs finished [1]
Jobs failed [0]
Please check the summary report at:
/u01/software/19C_JULY_PSU/DBPATCH_1916/cfgtoollogs/upgrade/auto/status/status.html
/u01/software/19C_JULY_PSU/DBPATCH_1916/cfgtoollogs/upgrade/auto/status/status.log
[oracle@19cracs1 DBPATCH_1916]$
Below are the log locations created by above AutoUpgrade run.
[oracle@19cracs1 DBPATCH_1916]$ ls -ltr
total 4
-rw-r--r--. 1 oracle oinstall 232 Oct 23 12:13
hol19cts_patch.cfg
drwxr-xr-x. 3 oracle oinstall 21 Oct 23 12:14 cfgtoollogs
drwxr-xr-x. 4 oracle oinstall 29 Oct 23 12:14 hol19cts1
[oracle@19cracs1 DBPATCH_1916]$ cd hol19cts1
[oracle@19cracs1 hol19cts1]$ ls -ltr
total 8
drwx------. 2 oracle oinstall 4096 Oct 23 12:14 temp
drwx------. 3 oracle oinstall 4096 Oct 23 12:14 100
[oracle@19cracs1 hol19cts1]$ cd 100
[oracle@19cracs1 100]$ ls -ltr
total 460
-rw-------. 1 oracle oinstall 448 Oct 23 12:14 autoupgrade_err.log
-rw-------. 1 oracle oinstall 608 Oct 23 12:14
autoupgrade_20221023_user.log
drwx------. 2 oracle oinstall 4096 Oct 23 12:14 prechecks
-rw-------. 1 oracle oinstall 458446 Oct 23 12:14
autoupgrade_20221023.log
[oracle@19cracs1 100]$ cd prechecks/
[oracle@19cracs1 prechecks]$ ls -ltr
total 484
-rw-------. 1 oracle oinstall 133370 Oct 23 12:14
prechecks_cdb_root.log
-rw-------. 1 oracle oinstall 92271 Oct 23 12:14 prechecks_pdb_seed.log
-rw-------. 1 oracle oinstall 92175 Oct 23 12:14 prechecks_testpdb.log
-rw-------. 1 oracle oinstall 13812 Oct 23 12:14 hol19cts_checklist.xml
-rw-------. 1 oracle oinstall 5653 Oct 23 12:14 hol19cts_checklist.cfg
-rw-------. 1 oracle oinstall 14722 Oct 23 12:14 hol19cts_checklist.json
-rw-------. 1 oracle oinstall 39968 Oct 23 12:14 hol19cts_preupgrade.html
-rw-------. 1 oracle oinstall 65359 Oct 23 12:14 upgrade.xml
-rw-------. 1 oracle oinstall 22514 Oct 23 12:14 hol19cts_preupgrade.log
[oracle@19cracs1 DBPATCH_1916]$ $ORACLE_HOME/jdk/bin/java -jar
$ORACLE_HOME/rdbms/admin/autoupgrade.jar -config hol19cts_patch.cfg -mode
deploy
AutoUpgrade 22.5.221011 launched with default internal
options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 CDB(s) plus 2 PDB(s) will be processed
Type 'help' to list console commands
upg> lsj
+----+---------+-----+---------+-------+----------+-------+-------+
|Job#|
DB_NAME|STAGE|OPERATION| STATUS|START_TIME|UPDATED|MESSAGE|
+----+---------+-----+---------+-------+----------+-------+-------+
| 101|hol19cts1|
GRP|EXECUTING|RUNNING| 12:30:12|
1s ago| |
+----+---------+-----+---------+-------+----------+-------+-------+
Total jobs 1
upg> lsj
+----+---------+-----+---------+-------+----------+-------+-------+
|Job#|
DB_NAME|STAGE|OPERATION| STATUS|START_TIME|UPDATED|MESSAGE|
+----+---------+-----+---------+-------+----------+-------+-------+
| 101|hol19cts1|
GRP|EXECUTING|RUNNING| 12:30:12|
4s ago| |
+----+---------+-----+---------+-------+----------+-------+-------+
Total jobs 1
upg> lsj
+----+---------+---------+---------+-------+----------+-------+----------------------------+
|Job#| DB_NAME| STAGE|OPERATION|
STATUS|START_TIME|UPDATED|
ESSAGE|
+----+---------+---------+---------+-------+----------+-------+----------------------------+
| 101|hol19cts1|PRECHECKS|EXECUTING|RUNNING| 12:30:12| 0s ago|Loading database
nformation|
+----+---------+---------+---------+-------+----------+-------+----------------------------+
Total jobs 1
upg> lsj+----+---------+---------+---------+-------+----------+-------+----------------------------+
|Job#| DB_NAME| STAGE|OPERATION|
STATUS|START_TIME|UPDATED|
MESSAGE|
+----+---------+---------+---------+-------+----------+-------+----------------------------
| 101|hol19cts1|PRECHECKS|EXECUTING|RUNNING| 12:30:12| 2s ago|Loading database
information|
+----+---------+---------+---------+-------+----------+-------+----------------------------+
Total jobs 1
upg> lsj
+----+---------+-----+---------+-------+----------+-------+------------------------+
|Job#|
DB_NAME|STAGE|OPERATION| STATUS|START_TIME|UPDATED| MESSAGE|
+----+---------+-----+---------+-------+----------+-------+------------------------+
| 101|hol19cts1|DRAIN|EXECUTING|RUNNING| 12:30:12|33s ago|Disabling RAC if present|
+----+---------+-----+---------+-------+----------+-------+------------------------+
Total jobs 1
upg> lsj
+----+---------+-----+---------+-------+----------+-------+----------------------+
|Job#|
DB_NAME|STAGE|OPERATION| STATUS|START_TIME|UPDATED| MESSAGE|
+----+---------+-----+---------+-------+----------+-------+----------------------+
| 101|hol19cts1|DRAIN|EXECUTING|RUNNING| 12:30:12| 4s ago|Shutting down database|
+----+---------+-----+---------+-------+----------+-------+----------------------+
Total jobs 1
upg> lsj
+----+---------+---------+---------+-------+----------+-------+--------------------+
|Job#| DB_NAME| STAGE|OPERATION|
STATUS|START_TIME|UPDATED|
MESSAGE|
+----+---------+---------+---------+-------+----------+-------+--------------------+
| 101|hol19cts1|DBUPGRADE|EXECUTING|RUNNING| 12:30:12|14s ago|49%Patching
DB$ROOT|
+----+---------+---------+---------+-------+----------+-------+--------------------+
upg> Job 101 completed
------------------- Final Summary --------------------
Number of databases [ 1 ]
Jobs finished [1]
Jobs failed [0]
Jobs restored [0]
Jobs pending [0]
/u01/software/19C_JULY_PSU/DBPATCH_1916/cfgtoollogs/upgrade/auto/status/status.html
/u01/software/19C_JULY_PSU/DBPATCH_1916/cfgtoollogs/upgrade/auto/status/status.log
[oracle@19cracs1 DBPATCH_1916]$
It is cool that we can now use AutoUpgrade for patching as well.
Things I observed.
1. We need to install new home and patch it with new patch and keep it ready for AutoUpgrade to do the home switch. this means, we need more space to accommodate multiple DB homes.
2. Patching using AutoUpgrade does required full downtime of the database. At this moment I don't think it supports AutoUpgrade Patching(I don't see any such option at this moment). I hope we will be able to do rolling patching using AutoUpgrade in its future versions.
Thanks for reading this post, I hope above post helps few of you.
Thanks
Sambaiah Sammeta
No comments:
Post a Comment