Sunday, 15 February 2015

Apply PSU patch in Grid Infrastructures 11gr2

Before applying any patch it is best practice to go through the ReadMe of  the patch.

The patch installations differs based on following aspects of existing configuration. E.g
  • GI home is shared or non-shared
  • The Oracle RAC database home is shared or non-shared
  • The Oracle RAC database home software is on ACFS or non-ACFS file systems.
  • Patch all the Oracle RAC database and the GI homes together, or patch each home individually


So choose the most appropriate case that is suitable based on the existing configurations and patch intention.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Steps:

opatch lsinventory -detail -oh $GI_HOME
opatch lsinventory -detail -oh $ORACLE_HOME
/u01/app/oracle/product/11.2.0/dbhome_1/OPatch/ocm/bin/emocmrsp  ( scp ocmrf.rs to all nodes)

opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir 13348650 -oh $GI_HOME

opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir 13348650/custom/server/13348650

# $GI_HOME/OPatch/opatch auto ./patch -oh $GI_HOME -ocmrf ocm.rsp
# $ORACLE_HOME/OPatch/opatch auto ./patch -oh $ORACLE_HOME -ocmrf ocm.rsp


Now do same on other nodes.

Once done on all nodes, verify it:

opatch lsinventory -detail -oh $GI_HOME

From any one node:

SQL> @catbundle.sql psu apply

++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Detailed steps:


Prerequisites:

1.  OPatch utility version 11.2.0.1.8 or later. Install it as below if version is lower:

cd /usr/orasys/patches

229:+ASM1_node1:/usr/orasys/patches> ls -lrt

-rw-r--r-- 1 oracle dba   32510817 Aug 20 02:44 p6880880_112000_Linux-x86-64.zip
-rw-r--r-- 1 oracle dba 1156126720 Aug 20 02:44 p13348650_112030_Linux-x86-64.tar

unzip p6880880_112000_Linux-x86-64.zip -d /usr/orasys/11.2.0.3_CRS

$ORACLE_HOME/OPatch/opatch version <- should be 11.2.0.1.8 or later now

2. Create OCM configuration as follows:

/usr/orasys/11.2.0.3_CRS/OPatch/ocm/bin/emocmrsp     --- As Oracle user


Validation of Oracle Inventory:

Inventory should be consistent for oracle homes to be patches ( both GI and RDBMS homes)

%<ORACLE_HOME>/OPatch/opatch lsinventory -detail -oh <ORACLE_HOME>

Unzip patch:
tar xvf p13348650_112030_Linux-x86-64.tar
Determine whether any currently installed one-off patches conflict with the PSU patch as follows:
In the unzipped directory as in 
 opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/13343438 –oh $GRID_HOME
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/13343438/custom/server/13343438 –oh $DB_HOME

Note that Oracle proactively provides PSU one-off patches for common conflicts.
Use My Oracle Support Note 1061295.1 Patch Set Updates - One-off Patch Conflict Resolution to determine, for each conflicting patch, whether a conflict resolution patch is already available, and if you need to request a new conflict resolution patch or if the conflict may be ignored.

When all the one-off patches that you have requested are available at My Oracle Support, proceed with Patch installation.


Apply patch now:


Ask SEs to run below command as root user:

Note: it must be executed on each node in the cluster if the GI home or Oracle RAC database home is in Non-shared storage. The utility should not be run in parallel on the cluster nodes.
Depending on command line options specified, one invocation of Opatch can patch the GI home, one or more Oracle RAC database homes, or both GI and Oracle RAC database homes of the same Oracle release version. You can also roll back the patch with the same selectivity.


Add the directory containing the opatch to the $PATH environment variable. For example:
export PATH=$PATH:<GI_HOME>/OPatch
To patch GI home and all Oracle RAC database homes of the same version:
#opatch auto <UNZIPPED_PATCH_LOCATION> -ocmrf <ocm response file>


Output of above cmd would be as follows:

[root@node1 patches]# /usr/orasys/11.2.0.3_CRS/OPatch/opatch auto ./p13348650_112030_Linux-x86-64 -oh /usr/orasys/11.2.0.3_CRS -ocmrf ocm.rsp

Executing /usr/bin/perl /usr/orasys/11.2.0.3_CRS/OPatch/crs/patch112.pl -patchdir . -patchn p13348650_112030_Linux-x86-64 -oh /usr/orasys/11.2.0.3_CRS -ocmrf ocm.rsp -paramfile /usr/orasys/11.2.0.3_CRS/crs/install/crsconfig_params
opatch auto log file location is /usr/orasys/11.2.0.3_CRS/OPatch/crs/../../cfgtoollogs/opatchauto2015-08-12_04-42-49.log
Detected Oracle Clusterware install
Using configuration parameter file: /usr/orasys/11.2.0.3_CRS/crs/install/crsconfig_params
Successfully unlock /usr/orasys/11.2.0.3_CRS
patch ./p13348650_112030_Linux-x86-64/13348650  apply successful for home  /usr/orasys/11.2.0.3_CRS
patch ./p13348650_112030_Linux-x86-64/13343438  apply successful for home  /usr/orasys/11.2.0.3_CRS
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-9154: Loading 'oracleoks.ko' driver.
ACFS-9154: Loading 'oracleadvm.ko' driver.
ACFS-9154: Loading 'oracleacfs.ko' driver.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9156: Detecting control device '/dev/asm/.asm_ctl_spec'.
ACFS-9156: Detecting control device '/dev/ofsctl'.
ACFS-9309: ADVM/ACFS installation correctness verified.
CRS-4123: Oracle High Availability Services has been started.
[root@node1 patches]#

- Load Modified SQL Files into the Database

SQL> @catbundle.sql psu apply


References: https://updates.oracle.com/Orion/Services/download?type=readme&aru=14279366

No comments:

Post a Comment