Please read carefully and refer to the README document for the latest steps, processes and related requirements for the overall upgrade of Oracle 19c rac cluster from 19.3 opatch to 19.10.
1, View the current database patch version
col ACTION for a8 col status for a15 set line 999 col ACTION_TIME for a30 col DESCRIPTION for a50 SQL> select patch_id, action,status,action_time,description from dba_registry_sqlpatch; PATCH_ID ACTION STATUS ACTION_TIME DESCRIPTION ---------- -------- ---------- ------------------------------ ------------------------------------------------------------ 29517242 APPLY SUCCESS 24-JUN-21 05.57.37.337431 PM Database Release Update : 19.3.0.0.190416 (29517242) SQL> !$ORACLE_HOME/OPatch/opatch lspatches 29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399) 29517242;Database Release Update : 19.3.0.0.190416 (29517242) OPatch succeeded. [oracle@rac01.hkrt.cn:/u01/app/oracle/product/19.0.0/db_1/OPatch]$opatch version OPatch Version: 12.2.0.1.17 OPatch succeeded.
Required Opatch packages and patches:
p32126842_190000_Linux-x86-64.zip p6880880_122010_Linux-x86-64.zip
2, Back up the database home directory to prevent rollback of upgrade failure
3, RAC two node GI_home and DB_ Replace the new Opatch with the home (modify in the same steps as the standby database)
be careful grid User's OPatch Insufficient permissions, required root User replacement, pay attention to empowerment [root@saast01 ~]# mv /u01/app/19.0.0/grid/OPatch /tmp/OPatch_bak19017 [root@saast01 ~]# unzip p6880880_122010_Linux-x86-64.zip -d /u01/app/19.0.0/grid/ [root@saast01 ~]# cd /u01/app/19.0.0/grid/ [root@rac02 grid]# chown -R grid.oinstall OPatch [root@rac02 grid]# chmod -R 775 OPatch oracle User replaces new version OPatch [oracle@saast02.hkrt.cn:/u01/app/oracle/product/19.0.0/db_1]$mv OPatch OPatch_bak19017 [oracle@saast02.hkrt.cn:/home/oracle]$unzip p6880880_122010_Linux-x86-64.zip -d $ORACLE_HOME/ Verify view grid And oracle user opatch The version is the latest [grid@rac01.hkrt.cn:/u01/app/19.0.0/grid/OPatch]$opatch version OPatch Version: 12.2.0.1.24 [oracle@rac02.hkrt.cn:/u01/app/oracle/product/19.0.0/db_1/OPatch]$opatch version OPatch Version: 12.2.0.1.24
4, Check the consistency of the list information on the grid home page and the Oracle home page (note that both Oracle and grid users of the rac main database need to check, and Oracle users of the standby database need to check)
[grid@saast01.hkrt.cn:/u01/app/19.0.0/grid/OPatch]$./opatch lsinventory -detail -oh $ORACLE_HOME [grid@saast02.hkrt.cn:/u01/app/19.0.0/grid/OPatch]$./opatch lsinventory -detail -oh $ORACLE_HOME [oracle@saast01.hkrt.cn:/u01/app/oracle/product/19.0.0/db_1/OPatch]$./opatch lsinventory -detail -oh $ORACLE_HOME [oracle@saast02.hkrt.cn:/u01/app/oracle/product/19.0.0/db_1/OPatch]$./opatch lsinventory -detail -oh $ORACLE_HOME Spare warehouse: [oracle@p4.hkrt.cn:/home/oracle]$/u01/app/oracle/product/19.0.0/db_1/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME
5, Unzip the patch package and store it in the shared path that grid and oracle users can access. Note that grid users unzip. Extract the spare database node from the oracle home directory
[root@saast02 ~]# cd / [root@saast02 /]# mkdir soft [root@saast02 /]# chmod -R 777 soft [grid@rac01.hkrt.cn:/home/grid/soft]$unzip p32126842_190000_Linux-x86-64.zip -d /patch/ Spare warehouse: [oracle@p4.hkrt.cn:/home/oracle]$unzip p32126842_190000_Linux-x86-64.zip -d patch/
6, Carry out OPatch patch conflict detection. If there is a problem, solve it and re detect it. (the standby database can only run oracle detection)
[grid@saast01.hkrt.cn:/home/grid]$/u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/32126842/32226239/32218454 [grid@saast01.hkrt.cn:/home/grid]$/u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/32126842/32226239/32222571 [grid@saast01.hkrt.cn:/home/grid]$/u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/32126842/32226239/32218663 [grid@saast01.hkrt.cn:/home/grid]$/u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/32126842/32226239/29340594 [grid@saast01.hkrt.cn:/home/grid]$/u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/32126842/32226239/32240590 [oracle@saast01.hkrt.cn:/home/oracle]$/u01/app/oracle/product/19.0.0/db_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/32126842/32226239/32218454 [oracle@saast01.hkrt.cn:/home/oracle]$/u01/app/oracle/product/19.0.0/db_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/32126842/32226239/32222571 Spare warehouse: [oracle@p4.hkrt.cn:/home/oracle]$/u01/app/oracle/product/19.0.0/db_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/oracle/patch/32126842/32226239/32218454 [oracle@p4.hkrt.cn:/home/oracle]$/u01/app/oracle/product/19.0.0/db_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/oracle/patch/32126842/32226239/32222571
7, # opatch system space detection is performed at both nodes. If the path of opatch is greater than 20G, ignore the detection (standby oracle user detection)
Grid Home directory: vim /tmp/patch_list_gihome.txt /soft/32126842/32226239/32218454 /soft/32126842/32226239/32222571 /soft/32126842/32226239/32218663 /soft/32126842/32226239/29340594 /soft/32126842/32226239/32240590 [grid@saast01.hkrt.cn:/home/grid]$/u01/app/19.0.0/grid/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt [oracle@saast01.hkrt.cn:/home/oracle]$cat /tmp/patch_list_dbhome.txt /soft/32126842/32226239/32218454 /soft/32126842/32226239/32222571 [oracle@saast01.hkrt.cn:/home/oracle]$/u01/app/oracle/product/19.0.0/db_1/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt Spare warehouse: [oracle@p4181-170.hkrt.cn:/home/oracle]$/u01/app/oracle/product/19.0.0/db_1/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt
8, Conflict detection, analysis and resolution before patch installation
root User under grid User's patchauto Detect both nodes. [root@saast01 ~]# /u01/app/19.0.0/grid/OPatch/opatchauto apply /soft/32126842/32226239 -analyze [root@saast02 ~]# /u01/app/19.0.0/grid/OPatch/opatchauto apply /soft/32126842/32226239 -analyze
9, Fix BUG 29859410 before formal patch installation
Note: the 19C} BUG 29859410 problem is due to the local oui patch generated when installing 19c GI The XML file is not created on the remote node, which will lead to the problem that the remote node cannot be operated when patching. Therefore, in order to avoid patch failure, the file of the master node can be copied to the remote node in advance with permissions.
[root@saast01 ContentsXML]# scp oui-patch.xml 192.168.xxx.xxx:/u01/app/oraInventory/ContentsXML/ [root@saast02 ContentsXML]# chmod 660 oui-patch.xml [root@saast02 ContentsXML]# chown grid:oinstall oui-patch.xml
10, First install the oracle patch of the standby database. The monitoring and database of the standby database need to be closed at a single point. After the patch installation is completed, start to mount and normally receive the logs of the main library
SQL> shutdown immediate; [oracle@p4$lsnrctl stop [oracle@p4]$cd /home/oracle/patch/32126842/32226239/32218454/ [oracle@p4:]$/u01/app/oracle/product/19.0.0/db_1/OPatch/opatch apply Oracle Interim Patch Installer version 12.2.0.1.24 Copyright (c) 2021, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/19.0.0/db_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/19.0.0/db_1/oraInst.loc OPatch version : 12.2.0.1.24 OUI version : 12.2.0.7.0 Log file location : /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatch/opatch2021-07-06_17-04-24PM_1.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 32218454 Do you want to proceed? [y|n] y User Responded with: Y All checks passed. Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/u01/app/oracle/product/19.0.0/db_1') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Applying interim patch '32218454' to OH '/u01/app/oracle/product/19.0.0/db_1' ApplySession: Optional component(s) [ oracle.network.gsm, 19.0.0.0.0 ] , [ oracle.rdbms.ic, 19.0.0.0.0 ] , [ oracle.rdbms.tg4db2, 19.0.0.0.0 ] , [ oracle.tfa, 19.0.0.0.0 ] , [ oracle.net.cman, 19.0.0.0.0 ] , [ oracle.network.cman, 19.0.0.0.0 ] , [ oracle.oid.client, 19.0.0.0.0 ] , [ oracle.options.olap.api, 19.0.0.0.0 ] , [ oracle.options.olap, 19.0.0.0.0 ] , [ oracle.xdk.companion, 19.0.0.0.0 ] , [ oracle.jdk, 1.8.0.191.0 ] not present in the Oracle Home or a higher version is found. Patching component oracle.rdbms, 19.0.0.0.0... Patching component oracle.rdbms.rsf, 19.0.0.0.0... Patching component oracle.rdbms.util, 19.0.0.0.0... Patching component oracle.assistants.acf, 19.0.0.0.0... Patching component oracle.assistants.deconfig, 19.0.0.0.0... Patching component oracle.assistants.server, 19.0.0.0.0... Patching component oracle.buildtools.rsf, 19.0.0.0.0... Patching component oracle.ctx, 19.0.0.0.0... Patching component oracle.dbjava.ic, 19.0.0.0.0... Patching component oracle.dbjava.jdbc, 19.0.0.0.0... Patching component oracle.dbjava.ucp, 19.0.0.0.0... Patching component oracle.dbtoolslistener, 19.0.0.0.0... Patching component oracle.ldap.owm, 19.0.0.0.0... Patching component oracle.ldap.rsf, 19.0.0.0.0... Patching component oracle.network.rsf, 19.0.0.0.0... Patching component oracle.oracore.rsf, 19.0.0.0.0... Patching component oracle.rdbms.dbscripts, 19.0.0.0.0... Patching component oracle.rdbms.deconfig, 19.0.0.0.0... Patching component oracle.sdo, 19.0.0.0.0... Patching component oracle.sdo.locator.jrf, 19.0.0.0.0... Patching component oracle.sqlplus, 19.0.0.0.0... Patching component oracle.xdk, 19.0.0.0.0... Patching component oracle.marvel, 19.0.0.0.0... Patching component oracle.xdk.rsf, 19.0.0.0.0... Patching component oracle.ctx.atg, 19.0.0.0.0... Patching component oracle.rdbms.scheduler, 19.0.0.0.0... Patching component oracle.rdbms.lbac, 19.0.0.0.0... Patching component oracle.duma, 19.0.0.0.0... Patching component oracle.ldap.rsf.ic, 19.0.0.0.0... Patching component oracle.odbc, 19.0.0.0.0... Patching component oracle.ctx.rsf, 19.0.0.0.0... Patching component oracle.oraolap.api, 19.0.0.0.0... Patching component oracle.xdk.parser.java, 19.0.0.0.0... Patching component oracle.oraolap, 19.0.0.0.0... Patching component oracle.sdo.locator, 19.0.0.0.0... Patching component oracle.sqlplus.ic, 19.0.0.0.0... Patching component oracle.mgw.common, 19.0.0.0.0... Patching component oracle.ons, 19.0.0.0.0... Patching component oracle.dbdev, 19.0.0.0.0... Patching component oracle.network.listener, 19.0.0.0.0... Patching component oracle.nlsrtl.rsf, 19.0.0.0.0... Patching component oracle.ovm, 19.0.0.0.0... Patching component oracle.oraolap.dbscripts, 19.0.0.0.0... Patching component oracle.xdk.xquery, 19.0.0.0.0... Patching component oracle.precomp.rsf, 19.0.0.0.0... Patching component oracle.javavm.client, 19.0.0.0.0... Patching component oracle.precomp.common.core, 19.0.0.0.0... Patching component oracle.ldap.security.osdt, 19.0.0.0.0... Patching component oracle.rdbms.oci, 19.0.0.0.0... Patching component oracle.rdbms.rman, 19.0.0.0.0... Patching component oracle.rdbms.crs, 19.0.0.0.0... Patching component oracle.rdbms.install.common, 19.0.0.0.0... Patching component oracle.javavm.server, 19.0.0.0.0... Patching component oracle.rdbms.drdaas, 19.0.0.0.0... Patching component oracle.rdbms.install.plugins, 19.0.0.0.0... Patching component oracle.rdbms.dv, 19.0.0.0.0... Patching component oracle.ldap.client, 19.0.0.0.0... Patching component oracle.network.client, 19.0.0.0.0... Patching component oracle.rdbms.rsf.ic, 19.0.0.0.0... Patching component oracle.precomp.common, 19.0.0.0.0... Patching component oracle.precomp.lang, 19.0.0.0.0... Patching component oracle.jdk, 1.8.0.201.0... Patch 32218454 successfully applied. Sub-set patch [29517242] has become inactive due to the application of a super-set patch [32218454]. Please refer to Doc ID 2161861.1 for any possible further required actions. Log file location: /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatch/opatch2021-07-06_17-04-24PM_1.log OPatch succeeded. cd /soft/32126842/32226239/32222571 $ORACLE_HOME/OPatch/opatch apply Start listening, database mount state SQL> startup mount; SQL> alter database recover managed standby database disconnect from session;
11, Automatic patch application for RAC cluster of main library
[root@saast01 ~]# /u01/app/19.0.0/grid/OPatch/opatchauto apply /soft/32126842/32226239 [root@saast02 ~]# /u01/app/19.0.0/grid/OPatch/opatchauto apply /soft/32126842/32226239
12, Verify that the patch is successfully installed and start receiving logs from the library MRR in real time
col ACTION for a10 col status for a15 set line 999 col ACTION_TIME for a30 col DESCRIPTION for a50 select patch_id, action,status,action_time,description from dba_registry_sqlpatch; PATCH_ID ACTION STATUS ACTION_TIME DESCRIPTION ---------- -------- ---------- ------------------------------ ------------------------------------------------------------ 29517242 APPLY SUCCESS 01-JUN-21 05.43.39.148708 PM Database Release Update : 19.3.0.0.190416 (29517242) 32218454 APPLY SUCCESS 29-JUN-21 03.38.39.437560 PM Database Release Update : 19.10.0.0.210119 (32218454) SQL> !$ORACLE_HOME/OPatch/opatch lspatches 32222571;OCW Interim patch for 32222571 32218454;Database Release Update : 19.10.0.0.210119 (32218454) OPatch succeeded. If the inspection finds OCW The update has not been successful. The patch can be executed separately: cd /soft/32126842/32226239/32222571 $ORACLE_HOME/OPatch/opatch apply Standby database open: SQL> alter database recover managed standby database cancel; Database altered. SQL> alter database open; Database altered. SQL> alter database recover managed standby database using current logfile disconnect from session; Database altered. SQL> select database_role,open_mode from v$database; DATABASE_ROLE OPEN_MODE -------------------------------- ---------------------------------------- PHYSICAL STANDBY READ ONLY WITH APPLY