Translate

Wednesday, 18 January 2012

How to Apply Patch 12827731 (Rolling Fashion) – 11.2.0.2.4 Grid Patch Set Update

How to Apply Patch 12827731 – 11.2.0.2.4 Grid Patch Set Update

12827731 Grid Infrastructure Patch Set Update is a combination of patch numbers 12827731 and 1282776. This patch can be applied in a rolling fashion.


In order to apply the patch, the opatch utility version must be 11.2.0.1.5 or later.

How to check and update the version of opatch utility?

Assuming that you have the appropriate version of the opatch utility

Download patch p12827731_112020_Linux-x86-64.zip from support.metalink.com
Transfer the zip file to the server where you intend to apply the patch [Note: I created a directory /oratemp01/11202/software and transferred the zip file to this location]
cd to the patch directory and unzip the patch file

cd /oratemp01/11202/software
unzip p12827731_112020_Linux-x86-64.zip
You will notice that the file extracts into two sub-directories 12827731 and 12827726

First set the appropriate environment.

export ORACLE_HOME=/u01/app/11.2.0.2/grid
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
I ran the prereq check using the following command to determine whether any currently installed one-off patches conflict with the current PSU patch

opatch prereq CheckconflictAgainstOHWithDetail -phBaseDir ./12827731


Generating OCM Response File:

During the Installation of the Patch you will be prompted to enter the path for the Oracle Configuration Manager (OCM) Response file. Here is how to generate it.

export ORACLE_HOME=/u01/app/11.2.0.2/grid
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

cd $ORACLE_HOME/OPatch/ocm/bin
./emocmrsp
You will be prompted to enter you oracle support email address and password, if you wish to be informed about Oracle Securuity meastures enter them and hit enter, if not just hit enter. A response file gets created at /u01/app/11.2.0.2/grid/OPatch/ocm/bin/ocm.rsp

Procedure to Apply the Patch to Non-Shared Grid Infrastructure HOME and Non-Shared RDBMS HOME:

I am going to use opatch auto command to apply the patch first to a Non-shared Grid Infrastructure HOME and then to a Non-Shared Oracle RDBMS HOME

Shut down all the databases running under the to be patched 11.2.0.2.x Grid Home (Remeber ASM for 11gR2 runs under the Grid Infrastructure HOME)

Step-1: Apply the Patch to the Non-Shared Grid Infrastructure HOME

First Set the appropriate environment variables

export ORACLE_HOME=/u01/app/11.2.0.2/grid
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
Don’t shutdown the clusterware

Go to the patch directory

cd /oratemp01/11202/software
Issue the following command as root user or some one who has sudo privileges

sudo opatch auto -oh $ORACLE_HOME

[oracle@xyz software]$ sudo opatch auto -oh $ORACLE_HOME
Executing /usr/bin/perl /u01/app/11.2.0.2/grid/OPatch/crs/patch112.pl -patchdir /oratemp01/11202 -patchn software -oh /u01/app/11.2.0.2/grid -paramfile /u01/app/11.2.0.2/grid/crs/install/crsconfig_params
opatch auto log file location is /u01/app/11.2.0.2/grid/OPatch/crs/../../cfgtoollogs/opatchauto2011-11-16_14-33-59.log
Detected Oracle Clusterware install
Using configuration parameter file: /u01/app/11.2.0.2/grid/crs/install/crsconfig_params
OPatch is bundled with OCM, Enter the absolute OCM response file path:
/u01/app/11.2.0.2/grid/OPatch/ocm/bin/ocm.rsp
Successfully unlock /u01/app/11.2.0.2/grid
patch /oratemp01/11202/software/12827731 apply successful for home /u01/app/11.2.0.2/grid
patch /oratemp01/11202/software/12827726 apply successful for home /u01/app/11.2.0.2/grid
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9312: Existing ADVM/ACFS installation detected.
ACFS-9314: Removing previous ADVM/ACFS installation.
ACFS-9315: Previous ADVM/ACFS components successfully removed.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9321: Creating udev for ADVM/ACFS.
ACFS-9323: Creating module dependencies - this may take some time.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
CRS-4123: Oracle High Availability Services has been started.

Do a opatch lsinventory to check if the patch has been applied to the 11.2.0.2.x GRID Infrastructure HOME

opatch lsinventory
Step-2: Apply the Patch to the 11.2.0.2.x Non-Shared RDBMS HOME

As mentioned earlier, in order to apply 12827731 patch the opatch utility version should be higher than 11.2.0.1.5.

How to check and update the version of opatch utility?

Shutdown all the databases associated with the 11.2.0.2.x Non-Shared RDBMS HOME

Set the appropriate environment variables

export ORACLE_HOME=/u01/app/oracle/product/11.2.0.2/db11202_r
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
Enter the following command as root user or someone with sudo privileges

sudo opatch auto -oh $ORACLE_HOME

When prompted enter the full path to the OCM (oracle configuration manager) response file generated in the Step-1

Here is the update from the above command:

[oracle@xyz software]$ sudo opatch auto -oh $ORACLE_HOME
[sudo] password for oracle:
Executing /usr/bin/perl /u01/app/oracle/product/11.2.0/db11202_r/OPatch/crs/patch112.pl -patchdir /oratemp01/11202 -patchn software -oh /u01/app/oracle/product/11.2.0/db11202_r -paramfile /u01/app/11.2.0.2/grid/crs/install/crsconfig_params
opatch auto log file location is /u01/app/oracle/product/11.2.0/db11202_r/OPatch/crs/../../cfgtoollogs/opatchauto2011-11-16_14-49-41.log
Detected Oracle Clusterware install
Using configuration parameter file: /u01/app/11.2.0.2/grid/crs/install/crsconfig_params
OPatch is bundled with OCM, Enter the absolute OCM response file path:
/u01/app/11.2.0.2/grid/OPatch/ocm/bin/ocm.rsp
patch /oratemp01/11202/software/12827731/custom/server/12827731 apply successful for home /u01/app/oracle/product/11.2.0/db11202_r
patch /oratemp01/11202/software/12827726 apply successful for home /u01/app/oracle/product/11.2.0/db11202_r

Do a opatch lsinventory to check if the patch has been applied to the 11.2.0.2.x RDBMS HOME

opatch lsinventory

Perform similar steps on the remaining nodes one after another (rolling fashion)

Startup all the databases, associated with the patched RDBMS HOME

For each database set ORACLE_SID variable and load modified sql files into the database. Perform these steps only from one node.

export ORACLE_HOME=/u01/app/oracle/product/11.2.0.2/db11202_r
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba
At the sql prompt enter the following commands:

@?/rdbms/admin/catbundle.sql psu apply
QUIT

No comments:

Post a Comment