Patch upgrade Oracle RAC to on linux

I used the steps below to apply patchset to an existing 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/ -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/ OLD_GRID_HOME/crs/install/ (as root)
vi OLD_GRID_HOME/crs/install/ (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/ (as root)
OLD_GRID_HOME/crs/install/ -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

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 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/ [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,,,,,
$ 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/ -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/
# GI_HOME/crs/install/ -patch

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

# cd GI_HOME/crs/install
# cp
# vi – 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/ -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 *