Types of Patches :
1. CRS Patchset
2. CRS Bundle Patch
3. One OFF patch
4. PSU (Bug fixes)
To obtain Opatch help:
opatch - help
opatch apply - help
opatch lsinventory -help
opatch rollback -help
opatch prereq -help
To check whether a patch support a rolling application:
Opatch query - is_rolling_patch <patch_location>
Opatch query -all | grep -i Rolling
Example:
opatch query -all /oracle/dbawork/jaydeep/90000 | grep rolling
Patch is a rolling patch: true
Apply rolling patch using opatch:
Example:
Use Oracle ReadMe for apply opatch:
1. Check Opatch version and inventory detail:
opatch version
opatch lsinventory -detail -oh <ORACLE_HOME_HOME>
opatch lsinventory -detail -oh <GRID_HOME>
2. Check rolling patch:
Opatch query - is_rolling_patch <patch_location>
Opatch query -all | grep -i Rolling
3. Shutdown the instance on node1:
srvctl stop instance -d TESTQA -i TESTQA1
srvctl stop asm -n stctestdb01
srvctl stop nodeapps -n stctestdb01
crsctl stop crs
or
crsctl stop crs
4. As as root to unlock protected files like
% custom/scripts/prerootpatch.sh -crshome <GRID_HOME> -crsuser oracle
5. This script will save important configuration settings like
% custom/scripts/prepatch.sh -crshome <GRID_HOME>
6. Use opatch to apply the patch on that node
<ORACLE_HOME>OPatch/opatch apply -skip_subset -skip_duplicate -local
Is the local system ready for patching?
Do you want to proceed? [y|n]
y
OPatch succeeded.
7. Start up the instance on that node
crsctl start crs
8. For all the remaining nodes, repeat steps 1-7 on each node, one node at a time
9. At this point, all of your instances should be up and the software on all nodes patched.Now pick one node on which to run the post-patch "catcpu.sql" script.You do not need to shut down any instances before doing this step.On the node you have picked, run catcpu.sql:
cd $ORACLE_HOME/cpu/CPUMONYYYY
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catcpu.sql
SQL> QUIT
10. Check the log file for errors.
11. Run this statement to check for "invalid objects"
SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS= 'INVALID' and OWNER like 'SYS%';
If any are found, then run the following:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @utlrp.sql
Patch De-installation Instructions:
% opatch rollback -id 900000 -local -oh <GRID_HOME> or <ORACLE_HOME>
1. CRS Patchset
2. CRS Bundle Patch
3. One OFF patch
4. PSU (Bug fixes)
To obtain Opatch help:
opatch - help
opatch apply - help
opatch lsinventory -help
opatch rollback -help
opatch prereq -help
To check whether a patch support a rolling application:
Opatch query - is_rolling_patch <patch_location>
Opatch query -all | grep -i Rolling
Example:
opatch query -all /oracle/dbawork/jaydeep/90000 | grep rolling
Patch is a rolling patch: true
Apply rolling patch using opatch:
Example:
Use Oracle ReadMe for apply opatch:
1. Check Opatch version and inventory detail:
opatch version
opatch lsinventory -detail -oh <ORACLE_HOME_HOME>
opatch lsinventory -detail -oh <GRID_HOME>
2. Check rolling patch:
Opatch query - is_rolling_patch <patch_location>
Opatch query -all | grep -i Rolling
3. Shutdown the instance on node1:
srvctl stop instance -d TESTQA -i TESTQA1
srvctl stop asm -n stctestdb01
srvctl stop nodeapps -n stctestdb01
crsctl stop crs
or
crsctl stop crs
4. As as root to unlock protected files like
% custom/scripts/prerootpatch.sh -crshome <GRID_HOME> -crsuser oracle
5. This script will save important configuration settings like
% custom/scripts/prepatch.sh -crshome <GRID_HOME>
6. Use opatch to apply the patch on that node
<ORACLE_HOME>OPatch/opatch apply -skip_subset -skip_duplicate -local
Is the local system ready for patching?
Do you want to proceed? [y|n]
y
OPatch succeeded.
7. Start up the instance on that node
crsctl start crs
8. For all the remaining nodes, repeat steps 1-7 on each node, one node at a time
9. At this point, all of your instances should be up and the software on all nodes patched.Now pick one node on which to run the post-patch "catcpu.sql" script.You do not need to shut down any instances before doing this step.On the node you have picked, run catcpu.sql:
cd $ORACLE_HOME/cpu/CPUMONYYYY
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catcpu.sql
SQL> QUIT
10. Check the log file for errors.
11. Run this statement to check for "invalid objects"
SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS= 'INVALID' and OWNER like 'SYS%';
If any are found, then run the following:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @utlrp.sql
Patch De-installation Instructions:
% opatch rollback -id 900000 -local -oh <GRID_HOME> or <ORACLE_HOME>
No comments:
Post a Comment