OPatch for 11gR2(11.2.0.3) RAC Database+Grid on Sparc 64-Bit Solaris10

1. Install Latest OPatch clients from support.oracle.com
– As Grid User —
unzip p6880880_112000_SOLARIS64.zip -d $ORACLE_HOME
##Replace All
– As Oracle User —
unzip p6880880_112000_SOLARIS64.zip -d $ORACLE_HOME
##Replace All
 
2. Set PATH variable for OPatch for both Grid and Oracle user profiles
–oracle–
vi .profile
PATH=/oracle/app/oracle/product/11.2.0/dbhome_1/bin:/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch:$PATH
 
–grid–
vi .profile
PATH=/grid/app/11.2.0/grid/bin:/grid/app/11.2.0/grid/OPatch/:$PATH
 
3. Validate Oracle OPatch inventory
— grid
opatch lsinventory -detail -oh $ORACLE_HOME
— Oracle
opatch lsinventory -detail -oh $ORACLE_HOME
 
4. Unzip the patch files as grid user in a shared location between both nodes
unzip p14275572_112030_<platform>.zip
Determine One-off Patch Conflict Detection and Resolution
$ opatch prereq CheckConflictAgainstOHWithDetail -ph <UNZIPPED_PATCH_LOCATION>/14275605 –oh $GRID_HOME
$ opatch prereq CheckConflictAgainstOHWithDetail -ph <UNZIPPED_PATCH_LOCATION>/14275605 –oh $DB_HOME
$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/14275572 –oh $GRID_HOME
$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/14275572/custom/server/14275572 –oh $DB_HOM
 
5. OPatching where GI Home Is Not Shared and ACFS File System Is Not Configured and Database Homes Are Not Shared
As Grid user create ocm.rsp file
cd /grid/app/11.2.0/grid/OPatch/ocm/bin
./emocmrsp
 
As root user
export PATH=$PATH:/grid/app/11.2.0/grid/OPatch
opatch auto /var/tmp/ -ocmrf /grid/app/11.2.0/grid/OPatch/ocm/bin/ocm.rsp
 
Executing /grid/app/11.2.0/grid/perl/bin/perl /grid/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /var -patchn tmp -ocmrf /grid/app/11.2.0/grid/OPatch/ocm/bin/ocm.rsp -paramfile /grid/app/11.2.0/grid/crs/install/crsconfig_params
/grid/app/11.2.0/grid/crs/install/crsconfig_params
/grid/app/11.2.0/grid/crs/install/s_crsconfig_defs
This is the main log file: /grid/app/11.2.0/grid/cfgtoollogs/opatchauto2012-12-02_13-56-59.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system: /grid/app/11.2.0/grid/cfgtoollogs/opatchauto2012-12-02_13-56-59.report.log
2012-12-02 13:56:59: Starting Clusterware Patch Setup
Using configuration parameter file: /grid/app/11.2.0/grid/crs/install/crsconfig_params
patch /var/tmp/14275572/custom/server/14275572 apply successful for home /oracle/app/oracle/product/11.2.0/dbhome_1
patch /var/tmp/14275605 apply successful for home /oracle/app/oracle/product/11.2.0/dbhome_1
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘csftest-1’
CRS-2673: Attempting to stop ‘ora.crsd’ on ‘csftest-1’
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on ‘csftest-1’
CRS-2673: Attempting to stop ‘ora.LISTENER_SCAN1.lsnr’ on ‘csftest-1’
CRS-2673: Attempting to stop ‘ora.cvu’ on ‘csftest-1’
CRS-2673: Attempting to stop ‘ora.OCR.dg’ on ‘csftest-1’
CRS-2673: Attempting to stop ‘ora.registry.acfs’ on ‘csftest-1’
CRS-2673: Attempting to stop ‘ora.DATA.dg’ on ‘csftest-1’
CRS-2673: Attempting to stop ‘ora.FRA.dg’ on ‘csftest-1’
CRS-2673: Attempting to stop ‘ora.oc4j’ on ‘csftest-1’
CRS-2673: Attempting to stop ‘ora.LISTENER.lsnr’ on ‘csftest-1’
CRS-2677: Stop of ‘ora.cvu’ on ‘csftest-1’ succeeded
CRS-2677: Stop of ‘ora.LISTENER_SCAN1.lsnr’ on ‘csftest-1’ succeeded
CRS-2673: Attempting to stop ‘ora.scan1.vip’ on ‘csftest-1’
CRS-2677: Stop of ‘ora.scan1.vip’ on ‘csftest-1’ succeeded
CRS-2677: Stop of ‘ora.LISTENER.lsnr’ on ‘csftest-1’ succeeded
CRS-2673: Attempting to stop ‘ora.csftest-1.vip’ on ‘csftest-1’
CRS-2677: Stop of ‘ora.csftest-1.vip’ on ‘csftest-1’ succeeded
CRS-2677: Stop of ‘ora.DATA.dg’ on ‘csftest-1’ succeeded
CRS-2677: Stop of ‘ora.FRA.dg’ on ‘csftest-1’ succeeded
CRS-2677: Stop of ‘ora.registry.acfs’ on ‘csftest-1’ succeeded
CRS-2677: Stop of ‘ora.oc4j’ on ‘csftest-1’ succeeded
CRS-2677: Stop of ‘ora.OCR.dg’ on ‘csftest-1’ succeeded
CRS-2673: Attempting to stop ‘ora.asm’ on ‘csftest-1’
CRS-2677: Stop of ‘ora.asm’ on ‘csftest-1’ succeeded
CRS-2673: Attempting to stop ‘ora.ons’ on ‘csftest-1’
CRS-2677: Stop of ‘ora.ons’ on ‘csftest-1’ succeeded
CRS-2673: Attempting to stop ‘ora.net1.network’ on ‘csftest-1’
CRS-2677: Stop of ‘ora.net1.network’ on ‘csftest-1’ succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on ‘csftest-1’ has completed
CRS-2677: Stop of ‘ora.crsd’ on ‘csftest-1’ succeeded
CRS-2673: Attempting to stop ‘ora.ctssd’ on ‘csftest-1’
CRS-2673: Attempting to stop ‘ora.evmd’ on ‘csftest-1’
CRS-2673: Attempting to stop ‘ora.asm’ on ‘csftest-1’
CRS-2673: Attempting to stop ‘ora.mdnsd’ on ‘csftest-1’
CRS-2673: Attempting to stop ‘ora.drivers.acfs’ on ‘csftest-1’
CRS-2677: Stop of ‘ora.evmd’ on ‘csftest-1’ succeeded
CRS-2677: Stop of ‘ora.mdnsd’ on ‘csftest-1’ succeeded
CRS-2677: Stop of ‘ora.drivers.acfs’ on ‘csftest-1’ succeeded
CRS-2677: Stop of ‘ora.asm’ on ‘csftest-1’ succeeded
CRS-2673: Attempting to stop ‘ora.cluster_interconnect.haip’ on ‘csftest-1’
CRS-2677: Stop of ‘ora.cluster_interconnect.haip’ on ‘csftest-1’ succeeded
CRS-2677: Stop of ‘ora.ctssd’ on ‘csftest-1’ succeeded
CRS-2673: Attempting to stop ‘ora.cssd’ on ‘csftest-1’
CRS-2677: Stop of ‘ora.cssd’ on ‘csftest-1’ succeeded
CRS-2673: Attempting to stop ‘ora.gipcd’ on ‘csftest-1’
CRS-2677: Stop of ‘ora.gipcd’ on ‘csftest-1’ succeeded
CRS-2673: Attempting to stop ‘ora.gpnpd’ on ‘csftest-1’
CRS-2677: Stop of ‘ora.gpnpd’ on ‘csftest-1’ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘csftest-1’ has completed
CRS-4133: Oracle High Availability Services has been stopped.
The path “/grid/app/11.2.0/grid/bin/acfsrepl_initializer” does not exist
The path “/grid/app/11.2.0/grid/bin/acfsrepl_apply” does not exist
The path “/grid/app/11.2.0/grid/bin/acfsrepl_apply.bin” does not exist
Successfully unlock /grid/app/11.2.0/grid
patch /var/tmp/14275572 apply successful for home /grid/app/11.2.0/grid
patch /var/tmp/14275605 apply successful for home /grid/app/11.2.0/grid
CRS-4123: Oracle High Availability Services has been started.
 
 
6. Patch Post-Installation Instructions
6.1 Apply conflict resolution patches if any
6.2 Load Modified SQl files into the database
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT
Check for Errors in Log –> /oracle/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/catbundle/catbundle_PSU_SWX_APPLY_2012Dec02_14_57_04.log
6.3 If using RMAN catalog then Upgrade Oracle Recovery Manager Catalog
$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
6.4 Patch Post-Installation Instructions for Databases Created or Upgraded after Installation of Patch in the Oracle Home
These instructions are for a database that is created or upgraded after the installation of the patch.
You must execute the steps 6.2 “Loading Modified SQL Files into the Database” for any new database only if it was created by any of the following methods:
Using DBCA (Database Configuration Assistant) to select a sample database (General, Data Warehouse, Transaction Processing)
Using a script that was created by DBCA that creates a database from a sample database
There are no actions required for databases that have been upgraded.
 
7. Check if patches applied and compare the output with the one you ran before
$ opatch lsinventory
 
8. Rollback OPatch for both Non-Shared GI and DBMS homes
As Grid user
opatch auto /var/tmp/ -rollback -ocmrf /grid/app/11.2.0/grid/OPatch/ocm/bin/ocm.rsp
For each database instance running out of the ORACLE_HOME, connect to the database using SQL*Plus as SYSDBA and run the rollback script as follows:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle_PSU_<database SID PREFIX>_ROLLBACK.sql
SQL> QUIT
Check the log file for any errors. The log file is 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.
Ensure that you verify the Oracle Inventory and compare the output with the one you ran before
$ opatch lsinventory
 
 

Category: DatabaseSolaris

Tags:

Leave a Reply

Article by: Shadab Mohammad