Manual Steps for Apply/Rollback Patch
Steps for Applying the Patch
Execute the following on each node of the cluster in non-shared CRS and DB home environment to apply the patch.
1. Stop the CRS managed resources running from DB homes.
If this is a GI Home environment, as the database home owner execute:
$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>
If this is an Oracle Restart Home environment, as the database home owner execute:
$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location>
Note: You need to make sure that the Oracle ACFS file systems are unmounted (see Section 2.6) and all other Oracle processes are shutdown before you proceed. |
2. Run the pre root script.
If this is a GI Home, as the root user execute:
# <GI_HOME>/crs/install/rootcrs.sh -prepatch
If this is an Oracle Restart Home, as the root user execute:
# <GI_HOME>/crs/install/roothas.sh -prepatch
3. Patch GI home.
As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/<OCW TRACKING BUG>
$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/<ACFS TRACKING BUG>
$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/<DBWLM TRACKING BUG>
$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/<DB RU TRACKING BUG>
$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/<TOMCAT RU TRACKING BUG>
4. Patch DB home.
As the database home owner execute:
$ <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>
$ <ORACLE_HOME>/OPatch/opatch apply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/<OCW TRACKING BUG>
$ <ORACLE_HOME>/OPatch/opatch apply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/<DB RU TRACKING BUG>
$ <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%/custom/scripts/postpatch.sh -dbhome <ORACLE_HOME>
5. Run the post script.
As the root user execute:
# <GI_HOME>/rdbms/install/rootadd_rdbms.sh
If this is a GI Home, as the root user execute:
# <GI_HOME>/crs/install/rootcrs.sh -postpatch
If this is an Oracle Restart Home, as the root user execute:
# <GI_HOME>/crs/install/roothas.sh -postpatch
6. If the message, "A system reboot is recommended before using ACFS is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.
7. Start the CRS managed resources that were earlier running from DB homes.
If this is a GI Home environment, as the database home owner execute:
$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> -n <node name>
If this is an Oracle Restart Home environment, as the database home owner execute:
$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location>
8. For each database instance running on the Oracle home being patched, run the datapatch utility as described in next table.
Table 3: Steps to Run the datapatch Utility for Single Tenant Versus Multitenant (CDB/PDB)
Steps |
Single Tenant (non-CDB/PDB) |
Steps |
Multitenant (CDB/PDB) |
1 |
% sqlplus /nolog |
1 |
% sqlplus /nolog |
2 |
SQL> Connect / as sysdba |
2 |
SQL> Connect / as sysdba |
3 |
SQL> startup |
3 |
SQL> startup |
4 |
SQL> quit |
4 |
SQL> alter pluggable database all open; |
5 |
% cd $ORACLE_HOME/OPatch |
5 |
SQL> quit |
6 |
% ./datapatch -verbose |
6 |
% cd $ORACLE_HOME/OPatch |
7 |
% ./datapatch -verbose |
It is recommended the Post Install step be run on all pluggable databases; however, the following command (SQL> alter pluggable databasePDB_NAME open ) could be substituted to only open certain PDBs in the multitenant database. Doing so will result in the Post Install step only being run on the CDB and opened PDB's. To update a pluggable database at a later date (skipped or newly plugged in), open the database using the alter pluggable database command mentioned previously and rerun the datapatch utility.
The datapatch utility will then run the necessary rollback scripts. An entry will be added to the dba_registry_sqlpatch view reflecting the patch rollback.
Check the following log files in $ORACLE_HOME/sqlpatch/patch ID/ for errors:
patch ID_apply_<database SID>_<CDB name>_<timestamp>.log
where database SID is the database SID, CDB name is the name of the multitenant container database, and timestamp is of the form YYYYMMMDD_HH_MM_SS.
In addition, you can check the log files found in $ORACLE_BASE/cfgtoollogs/catbundle and is named catbundle_PSU_<database SID>_ROLLBACK_<TIMESTAMP>.log where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS.