Jun 17, 2017

Applying PSU (APR 2017) Patch on Oracle 11gR2 Two Node RAC

This document will explain how to apply PSU patch ( April-2017) on Oracle 11.2.0.4 RAC, All the steps are performed on 2 node RAC.

Consolidated steps:

1 : Take Backup of OPatch folder on Both GI and RDBMS homes and keep recommended OPatch folder as per document.
2 : Stop OEM, if running
3 : Download required PSU (25476126) and unzip it
4 : Create response file from any OPatch location
5 : Apply the PSU node by node
6 : Check opatch details and run @catbundle psu apply followed by @utlrp.sql

Step details:

1) Stop OEM if running

bash-4.2$ export ORACLE_UNQNAME=PROD
bash-4.2$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
https://eddb1.imcl.com:5500/em/console/aboutApplication
Oracle Enterprise Manager 11g is not running.


2) Exting patches both GI and RDMS homes:

a) RDBMS Home
bash-4.2$ ./opatch lspatches
20831122;OCW Patch Set Update : 11.2.0.4.7 (20831122)
20760982;Database Patch Set Update : 11.2.0.4.7 (20760982)

OPatch succeeded.
bash-4.2$ ./opatch version
OPatch Version: 11.2.0.3.14

OPatch succeeded.
bash-4.2$

b) GI Home

bash-4.2$ pwd
/oracle/app/11.2.0/grid/OPatch
bash-4.2$ ./opatch version
OPatch Version: 11.2.0.3.14

OPatch succeeded.
bash-4.2$ ./opatch lspatches
20831122;OCW Patch Set Update : 11.2.0.4.7 (20831122)
20760982;Database Patch Set Update : 11.2.0.4.7 (20760982)
20299019;ACFS Patch set update : 11.2.0.4.6 (20299019)

OPatch succeeded.
bash-4.2$


3) Download Latest PSU and Unzip

bash-4.2$ cd /u02/Patch_dir
bash-4.2$ pwd
/u02/Patch_dir
bash-4.2$ ls
25476126                       PatchSearch.xml                p25476126_112040_AIX64-5L.zip


4) Create a response file

su - oracle
$cd $ORACLE_HOME/OPatch/ocm/bin/
bash-4.2$ pwd
/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch/ocm/bin
$./emocmrsp -no_banner -output /u02/Patch_dir/ocm.rsp

output:

bash-4.2$ ./emocmrsp -no_banner -output /u02/Patch_dir/ocm.rsp
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
The OCM configuration response file (/u02/Patch_dir/ocm.rsp) was successfully created.
bash-4.2$


5) Now run the patch installation as root user, to ensure that the installation is done directly to BOTH oracle and grid homes

# ./opatch auto /u02/Patch_dir/25476126 -ocmrf /u02/Patch_dir/ocm.rsp

output:

bash-4.2# pwd
/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch
bash-4.2# ./opatch auto /u02/Patch_dir/25476126 -ocmrf /u02/Patch_dir/ocm.rsp
Executing /oracle/app/11.2.0/grid/perl/bin/perl ./crs/patch11203.pl -patchdir /u02/Patch_dir -patchn 25476126 -ocmrf /u02/Patch_dir/ocm.rsp -paramfile /oracle/app/11.2.0/grid/crs/install/crsconfig_params

This is the main log file: /oracle/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatchauto2017-06-17_16-12-55.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/oracle/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatchauto2017-06-17_16-12-55.report.log

2017-06-17 16:12:55: Starting Clusterware Patch Setup
Using configuration parameter file: /oracle/app/11.2.0/grid/crs/install/crsconfig_params

Stopping RAC /oracle/app/oracle/product/11.2.0/dbhome_1 ...
Stopped RAC /oracle/app/oracle/product/11.2.0/dbhome_1 successfully

patch /u02/Patch_dir/25476126/24732075  apply successful for home  /oracle/app/oracle/product/11.2.0/dbhome_1
patch /u02/Patch_dir/25476126/23054319/custom/server/23054319  apply successful for home  /oracle/app/oracle/product/11.2.0/dbhome_1

Stopping CRS...
Stopped CRS successfully

patch /u02/Patch_dir/25476126/24732075  apply successful for home  /oracle/app/11.2.0/grid
patch /u02/Patch_dir/25476126/23054319  apply successful for home  /oracle/app/11.2.0/grid
patch /u02/Patch_dir/25476126/22502505  apply successful for home  /oracle/app/11.2.0/grid

Starting CRS...
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.

Starting RAC /oracle/app/oracle/product/11.2.0/dbhome_1 ...
Started RAC /oracle/app/oracle/product/11.2.0/dbhome_1 successfully

opatch auto succeeded.
bash-4.2#

6) Verify the Opatch applied or not?

su - oracle
bash-4.2$ pwd
/u02/Patch_dir
bash-4.2$ cd $ORACLE_HOME/OPatch
bash-4.2$ ./opatch lspatches
23054319;OCW Patch Set Update : 11.2.0.4.160719 (23054319)
24732075;Database Patch Set Update : 11.2.0.4.170418 (24732075)

OPatch succeeded.
bash-4.2$

#su - grid

bash-4.2$ ./opatch lspatches
22502505;ACFS Patch Set Update : 11.2.0.4.160419 (22502505)
23054319;OCW Patch Set Update : 11.2.0.4.160719 (23054319)
24732075;Database Patch Set Update : 11.2.0.4.170418 (24732075)

OPatch succeeded.
bash-4.2$ whoami
grid
bash-4.2$


Now you can proceed same steps in other nodes

Note: Application downtime is not required.

7) 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 and utlrp.sql script as follows:

# su - oracle
$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> @utlrp.sql
SQL>

Hope it will work for you. Put your comments if you have any remarks.


7 comments:

Translate >>