How to patch Oracle DB 11.2.0.4 RAC PSU 2018
Image source https://oracle.com
How to patch Oracle DB 11.2.0.4 RAC PSU 2018
LEGEND :
# = execute as root user
grid> = execute in grid environment
oracle> = execute in oracle/db environment
sql> = sqlplus environment
-- = comment
1. ENVIRONMENT CHECK
-- Ensure that the $PATH definition has the following executables: make, ar, ld, and nm.
2. BACKUP OCR
-- show/check status ocr backup status
# ocrconfig -showbackup
-- manual backup ocr
# ocrconfig -manualbackup
-- show/check status ocr backup status
# ocrconfig -showbackup
3. BACKUP SPFILE TO PFILE
oracle> sqlplus / as sysdba
sql> create pfile='/pfile.ora' from spfile;
4. GATHER DB REGISTRY STATUS
-- take note of each component status
set linesize 180
col comp_name format a60
select comp_id, comp_name, version, status, modified from dba_registry
order by 2;
5. REPLACE CURRENT OPATCH WITH REQUIRED OPATCH LEVEL
-- replace current opatch with required opatch level
-- or apply patch from required opatch location that have been determined
-- GI HOME
grid> cd $ORACLE_HOME
grid> mv OPatch OPatch_
grid> cp -Rp Opatch
-- DB HOME
oracle> cd $ORACLE_HOME
oracle> mv OPatch OPatch_
oracle> cp -Rp Opatch
6. OPATCH VERSION INFORMATION
-- make sure opatch release is 11.2.0.3.6 or later
grid> opatch lsinventory
-or-
oracle> opatch lsinventory
8. FULL BACKUP DATABASE
-- shutdown database
grid> srvctl stop database -d
-- startup mount database
grid> srvctl start database -d -o mount
-- backup database
setenv ORACLE_SID DMIPR00P1
oracle> rman target /
show all;
backup database;
setenv ORACLE_SID DMIPR01P1
oracle> rman target /
show all;
backup database;
9. SHUTDOWN CLUSTER
# crsctl stop crs
10. sudo /oracle/oraprod01/documentum/grid/v1120/grid_11.2.0.4/bin/crsctl start crs
11. CHECK PATCH CONFLICT
-- check patch conflict from each home (GI+DB)
grid> unzip p27967757_112040_.zip
grid> cd 27967757
grid> opatch prereq CheckConflictAgainstOHWithDetail -ph ./
-and-
oracle> cd 27967757
oracle> opatch prereq CheckConflictAgainstOHWithDetail -ph ./
12. CREATE OCM RESPONS FILE
-- enter blank on email for non-email provided
grid> OPatch/ocm/bin/emocmrsp -no_banner -output //ocm.rsp
/oracle/oraprod01/documentum/grid/v1120/grid_11.2.0.4/OPatch/ocm/bin/ocm.rsp
13. EXECUTE PATCH
# opatch auto /27967757 -ocmrf
14. POST INSTALLATION
14.1 Apply conflict resolution if there's any conflict stated on step 11
14.2 Load SQL
-- load modified sql into database for each database instance running on the Oracle home being patched,
-- connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:
oracle> cd $ORACLE_HOME/rdbms/admin
oracle> sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> select VERSION,ACTION_TIME,COMMENTS from sys.registry$history ;
SQL> QUIT
-- Check the following log files in $ORACLE_BASE/cfgtoollogs/catbundle for any errors:
-- catbundle_PSU__APPLY_.log
-- catbundle_PSU__GENERATE_.log
-- If the OJVM PSU was applied for a previous GI PSU patch,
-- you may see invalid Java classes after execution of the catbundle.sql script in the previous step.
-- If this is the case, run utlrp.sql to re-validate these Java classes.
oracle> cd $ORACLE_HOME/rdbms/admin
oracle> sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
14.3 If using RMAN catalog, the catalog needs to be upgraded.
oracle> rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
15. CHECK DB REGISTRY STATUS
-- take note of each component status
set linesize 180
col comp_name format a60
select comp_id, comp_name, version, status, modified from dba_registry
order by 2;
References :
Released: July 18, 2017, README doc, Patch 25869727 - Database Patch Set Update 11.2.0.4.170718 (Includes CPUJul2017)
Released: July, 2018, README doc, Patch 27967757 - Oracle Grid Infrastructure Patch Set Update 11.2.0.4.180717 (Includes Database PSU)
LEGEND :
# = execute as root user
grid> = execute in grid environment
oracle> = execute in oracle/db environment
sql> = sqlplus environment
-- = comment
1. ENVIRONMENT CHECK
-- Ensure that the $PATH definition has the following executables: make, ar, ld, and nm.
2. BACKUP OCR
-- show/check status ocr backup status
# ocrconfig -showbackup
-- manual backup ocr
# ocrconfig -manualbackup
-- show/check status ocr backup status
# ocrconfig -showbackup
3. BACKUP SPFILE TO PFILE
oracle> sqlplus / as sysdba
sql> create pfile='/pfile.ora' from spfile;
4. GATHER DB REGISTRY STATUS
-- take note of each component status
set linesize 180
col comp_name format a60
select comp_id, comp_name, version, status, modified from dba_registry
order by 2;
5. REPLACE CURRENT OPATCH WITH REQUIRED OPATCH LEVEL
-- replace current opatch with required opatch level
-- or apply patch from required opatch location that have been determined
-- GI HOME
grid> cd $ORACLE_HOME
grid> mv OPatch OPatch_
grid> cp -Rp Opatch
-- DB HOME
oracle> cd $ORACLE_HOME
oracle> mv OPatch OPatch_
oracle> cp -Rp Opatch
6. OPATCH VERSION INFORMATION
-- make sure opatch release is 11.2.0.3.6 or later
grid> opatch lsinventory
-or-
oracle> opatch lsinventory
8. FULL BACKUP DATABASE
-- shutdown database
grid> srvctl stop database -d
-- startup mount database
grid> srvctl start database -d -o mount
-- backup database
setenv ORACLE_SID DMIPR00P1
oracle> rman target /
show all;
backup database;
setenv ORACLE_SID DMIPR01P1
oracle> rman target /
show all;
backup database;
9. SHUTDOWN CLUSTER
# crsctl stop crs
10. sudo /oracle/oraprod01/documentum/grid/v1120/grid_11.2.0.4/bin/crsctl start crs
11. CHECK PATCH CONFLICT
-- check patch conflict from each home (GI+DB)
grid> unzip p27967757_112040_.zip
grid> cd 27967757
grid> opatch prereq CheckConflictAgainstOHWithDetail -ph ./
-and-
oracle> cd 27967757
oracle> opatch prereq CheckConflictAgainstOHWithDetail -ph ./
12. CREATE OCM RESPONS FILE
-- enter blank on email for non-email provided
grid> OPatch/ocm/bin/emocmrsp -no_banner -output //ocm.rsp
/oracle/oraprod01/documentum/grid/v1120/grid_11.2.0.4/OPatch/ocm/bin/ocm.rsp
13. EXECUTE PATCH
# opatch auto /27967757 -ocmrf
14. POST INSTALLATION
14.1 Apply conflict resolution if there's any conflict stated on step 11
14.2 Load SQL
-- load modified sql into database for each database instance running on the Oracle home being patched,
-- connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:
oracle> cd $ORACLE_HOME/rdbms/admin
oracle> sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> select VERSION,ACTION_TIME,COMMENTS from sys.registry$history ;
SQL> QUIT
-- Check the following log files in $ORACLE_BASE/cfgtoollogs/catbundle for any errors:
-- catbundle_PSU__APPLY_.log
-- catbundle_PSU__GENERATE_.log
-- If the OJVM PSU was applied for a previous GI PSU patch,
-- you may see invalid Java classes after execution of the catbundle.sql script in the previous step.
-- If this is the case, run utlrp.sql to re-validate these Java classes.
oracle> cd $ORACLE_HOME/rdbms/admin
oracle> sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
14.3 If using RMAN catalog, the catalog needs to be upgraded.
oracle> rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
15. CHECK DB REGISTRY STATUS
-- take note of each component status
set linesize 180
col comp_name format a60
select comp_id, comp_name, version, status, modified from dba_registry
order by 2;
References :
Released: July 18, 2017, README doc, Patch 25869727 - Database Patch Set Update 11.2.0.4.170718 (Includes CPUJul2017)
Released: July, 2018, README doc, Patch 27967757 - Oracle Grid Infrastructure Patch Set Update 11.2.0.4.180717 (Includes Database PSU)
The article you have shared here is great. I read your post with carefully, the points you mentioned can be very helpful. It is nice seeing your wonderful post. Get for more information how to patch inflatable kayak
ReplyDelete