Patch upgrade Oracle RAC 11.2.0.2 to 11.2.0.3 on linux

I used the steps below to apply patchset 11.2.0.3 to an existing 11.2.0.2 2-node RAC cluster on linux RHEL 5.8 64 bit.
Note that GRID_HOME and DB_HOME locations will both be changed as part of this patchset.

0) Download and unzip software from My Oracle Support into e.g. /unzipped
Main patch is 7 large zipfiles, is needed only on first node.
Two small pre-requisite patches need to be downloaded and unzipped on both nodes.

1) Apply pre-requisite patches, repeat on BOTH nodes
Patch 6880880 (opatch)
Patch 12539000

srvctl stop database -d DBNAME
/software/oracle/product/11.2.0/db_1/crs/install/rootcrs.pl -unlock (as root)
/unzipped/OPatch/opatch napply -oh OLD_GRID_HOME -local /unzipped/12539000
/unzipped/OPatch/opatch napply -oh OLD_DB_HOME -local /unzipped/12539000
cp -p OLD_GRID_HOME/crs/install/crsconfig_lib.pm OLD_GRID_HOME/crs/install/crsconfig_lib.pm.backup (as root)
vi OLD_GRID_HOME/crs/install/crsconfig_lib.pm (as root)
Add 'read_file' to the end of this line:
my @exp_func = qw(check_CRSConfig validate_olrconfig validateOCR read_file
OLD_GRID_HOME/rdbms/install/rootadd_rdbms.sh (as root)
OLD_GRID_HOME/crs/install/rootcrs.pl -patch (as root)
srvctl start database -d rmanp
srvctl start database -d rmant

2) Grid install (first node only)

cd /unzipped/grid
./runInstaller (choose upgrade option)

Specify new grid home location when asked, different from old grid home.
When prompted, run script as root on both nodes (node1 first, then node2)

3) Database install (first node only)

cd /unzipped/database
./runInstaller (I choose install, but alternatively choose upgrade to combine with (4) below) 

Specify new database home location when asked, different from old database home.
When prompted, run script as root on both nodes (node1 first, then node2).

4) Database upgrades (one node only) – if not done as part of (3) above via its ‘upgrade’ option.

alter system reset log_archive_dest scope=spfile sid='*' ;
alter system reset log_archive_dest_1 scope=spfile sid='*' ;
srvctl stop database -d DBNAME
srvctl start database -d DBNAME
cd NEW_DB_HOME/bin
./dbua

5) Cleanup

rm -fr /unzipped OLD_GRID_HOME OLD_DB_HOME
srvctl stop ASM -f (BUT do this ONLY if you are using ocfs and NOT using ASM, like I was)

More Information:

Update 2016 – Patch 12539000 is more involved than described above, complete steps are:

1) Download 6880880 (latest OPatch) for 11.2.0.0.0 from MOS.
Unzip patch 6880880 in GI_HOME and $RDBMS_HOME on both nodes to override the OPatch directory there.
Choose A All when asked ‘replace OPatch/opatch.pl? [y]es, [n]o, [A]ll, [N]one, [r]ename: A’ on unzipping.

2) Download patch 12539000 from MOS.
To get the current version number for 12539000 (they are all different even 11.2.0.2.0, 11.2.0.2.1, 11.2.0.2.2, 11.2.0.2.3, 11.2.0.2.4, 11.2.0.2.5):
$ GI_HOME/OPatch/opatch lsinventory
$ GI_HOME/bin/crsctl query crs softwareversion
$ GI_HOME/bin/crsctl query crs releaseversion
$ GI_HOME/bin/crsctl query crs activeversion

The readme.txt for patch 12539000 has incorrect instructions within it, MOSDoc 1486109.1 has the real instructions:

1. Stop all databases manually as oracle user: /bin/srvctl stop database -d on node1

2. Unlock GI home as root user:

# GI_HOME/crs/install/rootcrs.pl -unlock

3. Apply the patch to GI and database homes as oracle user:

$ GI_HOME/OPatch/opatch napply -oh GI_HOME -local /junk/p12539000_112020_Linux-x86-64/12539000
$ DB_HOME/11.2.0/OPatch/opatch napply -oh DB_HOME/11.2.0 -local /junk/p12539000_112020_Linux-x86-64/12539000

Answer y or Y when prompted, can leave email blank when promoted.

Repeat (2) and (3) on node2.

4. Lock GI home as root user on node1:

# GI_HOME/rdbms/install/rootadd_rdbms.sh
# GI_HOME/crs/install/rootcrs.pl -patch

Except that second (-patch) command above gave me “Undefined subroutine &main::read_file called at GI_HOME/crs/install/crspatch.pm line 86.”
Fix is MOSDoc 1268390.1

# cd GI_HOME/crs/install
# cp crsconfig_lib.pm crsconfig_lib.pm.bak
# vi crsconfig_lib.pm – and add read_file to the end of this line: “my @exp_func = qw(check_CRSConfig validate_olrconfig validateOCR read_file”
# GI_HOME/crs/install/rootcrs.pl -patch

Repeat (4) on node2.

5. Start all databases manually as oracle user: /bin/srvctl start database -d on node1

March 1, 2013

Leave a Reply

Your email address will not be published. Required fields are marked *