how to apply patchset updates to your grid infrastructure

March 23, 2012 — Leave a comment

As time goes by people report bugs for the oracle software. Some of them are critical, others not. Sooner or later you will come to the situation where you’ll have to patch your oracle software. The utility oracle uses to patch it’s software is called opatch. To avoid any issues with opatch always download the latest release from oracle support ( search for patch number: 6880880 and download ).

For this little demonstration we will apply the Patch Set Update one for the Grid Infratrucure. Note that this patch includes Patch Set Update 1 for the database software, too ( we will patch the database software in a future post ). If you did not transer the patchset and opatch to your Virtual Machine, now is the time to do so ( see here for a description on how to do it ).

As mentioned before, always bring your opatch to the latest release:

su - grid
cd /opt/oracle/stage
unzip p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME/

It is safe to answer “All” if the unzip utility ask to replace some files.

Extract the patch:

su - grid
cd /opt/oracle/stage
unzip p13348650_112030_LINUX.zip

The structure of the oracle patches is always the same. You will get subdirectories named with the patch number and the readme:

ls -la
drwxr-xr-x 4 grid oinstall      4096 Jan 14 17:08 13343438
drwxr-xr-x 5 grid oinstall      4096 Jan 14 17:08 13348650
-rw-r--r-- 1 grid oinstall       422 Jan 14 17:08 bundle.xml
-rw------- 1 grid oinstall 335597984 Mar 23 11:04 p13348650_112030_Linux-x86-64.zip
drwxr-xr-x 8 grid oinstall      4096 Sep 22  2011 grid
-rw-r--r-- 1 grid oinstall  32510817 Mar 23 10:54 p6880880_112000_Linux-x86-64.zip
-rw-rw-r-- 1 grid oinstall    107674 Jan 16 14:49 README.html
-rw-r--r-- 1 grid oinstall        21 Jan 14 17:08 README.txt

Make sure you carefully read the readme.

Applying the patch is straight forward ( Note that Patches to the Grid Infrastructure need to be applied as root ). The first thing to do is to check if the current oracle inventory is consistent:

su - grid
cd /opt/oracle/stage
export PATH=$ORACLE_HOME/OPatch:$PATH
opatch lsinventory -detail -oh $ORACLE_HOME

If your inventory is fine, you should see the following output:

Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation.  All rights reserved.
Oracle Home       : /opt/oracle/product/crs/11.2.0.3
Central Inventory : /opt/oracle/oraInventory
   from           : /opt/oracle/product/crs/11.2.0.3/oraInst.loc
OPatch version    : 11.2.0.3.0
OUI version       : 11.2.0.3.0
Log file location : /opt/oracle/product/crs/11.2.0.3/cfgtoollogs/opatch/opatch2012-03-23_11-14-23AM_1.log
Lsinventory Output file location : /opt/oracle/product/crs/11.2.0.3/cfgtoollogs/opatch/lsinv/lsinventory2012-03-23_11-14-23AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1): 
Oracle Grid Infrastructure                                           11.2.0.3.0
There are 1 products installed in this Oracle Home.
Installed Products (88): 
Agent Required Support Files                                         10.2.0.4.3
Assistant Common Files                                               11.2.0.3.0
Automatic Storage Management Assistant                               11.2.0.3.0
Bali Share                                                           1.1.18.0.0
Buildtools Common Files                                              11.2.0.3.0
Character Set Migration Utility                                      11.2.0.3.0
Cluster Ready Services Files                                         11.2.0.3.0
Cluster Verification Utility Common Files                            11.2.0.3.0
Cluster Verification Utility Files                                   11.2.0.3.0
Database SQL Scripts                                                 11.2.0.3.0
Deinstallation Tool                                                  11.2.0.3.0
Enterprise Manager Common Core Files                                 10.2.0.4.4
Enterprise Manager Common Files                                      10.2.0.4.3
Enterprise Manager plugin Common Files                               11.2.0.3.0
Expat libraries                                                       2.0.1.0.1
HAS Common Files                                                     11.2.0.3.0
HAS Files for DB                                                     11.2.0.3.0
Installation Common Files                                            11.2.0.3.0
Installation Plugin Files                                            11.2.0.3.0
Installer SDK Component                                              11.2.0.3.0
LDAP Required Support Files                                          11.2.0.3.0
OLAP SQL Scripts                                                     11.2.0.3.0
Oracle Clusterware RDBMS Files                                       11.2.0.3.0
Oracle Configuration Manager Deconfiguration                         10.3.1.0.0
Oracle Containers for Java                                           11.2.0.3.0
Oracle Core Required Support Files                                   11.2.0.3.0
Oracle Database 11g                                                  11.2.0.3.0
Oracle Database 11g Multimedia Files                                 11.2.0.3.0
Oracle Database Deconfiguration                                      11.2.0.3.0
Oracle Database User Interface                                       2.2.13.0.0
Oracle Database Utilities                                            11.2.0.3.0
Oracle DBCA Deconfiguration                                          11.2.0.3.0
Oracle Extended Windowing Toolkit                                    3.4.47.0.0
Oracle Globalization Support                                         11.2.0.3.0
Oracle Globalization Support                                         11.2.0.3.0
Oracle Grid Infrastructure                                           11.2.0.3.0
Oracle Help For Java                                                  4.2.9.0.0
Oracle Ice Browser                                                    5.2.3.6.0
Oracle Internet Directory Client                                     11.2.0.3.0
Oracle Java Client                                                   11.2.0.3.0
Oracle JDBC/OCI Instant Client                                       11.2.0.3.0
Oracle JDBC/THIN Interfaces                                          11.2.0.3.0
Oracle JFC Extended Windowing Toolkit                                4.2.36.0.0
Oracle JVM                                                           11.2.0.3.0
Oracle LDAP administration                                           11.2.0.3.0
Oracle Locale Builder                                                11.2.0.3.0
Oracle Multimedia                                                    11.2.0.3.0
Oracle Multimedia Client Option                                      11.2.0.3.0
Oracle Multimedia Java Advanced Imaging                              11.2.0.3.0
Oracle Multimedia Locator                                            11.2.0.3.0
Oracle Multimedia Locator RDBMS Files                                11.2.0.3.0
Oracle Net                                                           11.2.0.3.0
Oracle Net Listener                                                  11.2.0.3.0
Oracle Net Required Support Files                                    11.2.0.3.0
Oracle Netca Client                                                  11.2.0.3.0
Oracle Notification Service                                          11.2.0.3.0
Oracle Notification Service (eONS)                                   11.2.0.3.0
Oracle One-Off Patch Installer                                       11.2.0.1.7
Oracle Quality of Service Management (Client)                        11.2.0.3.0
Oracle Quality of Service Management (Server)                        11.2.0.3.0
Oracle RAC Deconfiguration                                           11.2.0.3.0
Oracle RAC Required Support Files-HAS                                11.2.0.3.0
Oracle Recovery Manager                                              11.2.0.3.0
Oracle Security Developer Tools                                      11.2.0.3.0
Oracle Text Required Support Files                                   11.2.0.3.0
Oracle Universal Installer                                           11.2.0.3.0
Oracle USM Deconfiguration                                           11.2.0.3.0
Oracle Wallet Manager                                                11.2.0.3.0
Parser Generator Required Support Files                              11.2.0.3.0
Perl Interpreter                                                     5.10.0.0.2
Perl Modules                                                         5.10.0.0.1
PL/SQL                                                               11.2.0.3.0
PL/SQL Embedded Gateway                                              11.2.0.3.0
Platform Required Support Files                                      11.2.0.3.0
Precompiler Required Support Files                                   11.2.0.3.0
RDBMS Required Support Files                                         11.2.0.3.0
RDBMS Required Support Files for Instant Client                      11.2.0.3.0
RDBMS Required Support Files Runtime                                 11.2.0.3.0
Required Support Files                                               11.2.0.3.0
Secure Socket Layer                                                  11.2.0.3.0
SQL*Plus                                                             11.2.0.3.0
SQL*Plus Files for Instant Client                                    11.2.0.3.0
SQL*Plus Required Support Files                                      11.2.0.3.0
SSL Required Support Files for InstantClient                         11.2.0.3.0
Sun JDK                                                             1.5.0.30.03
Universal Storage Manager Files                                      11.2.0.3.0
XDK Required Support Files                                           11.2.0.3.0
XML Parser for Java                                                  11.2.0.3.0
There are 88 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.

Make sure there are no conflicts with the patch you want to apply:

su - grid
cd /opt/oracle/stage
export PATH=$ORACLE_HOME/OPatch:$PATH
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /opt/oracle/stage/13343438 -oh $ORACLE_HOME

As this is a fresh installation with no patches applied until now, you should see the following output:

Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation.  All rights reserved.
PREREQ session
Oracle Home       : /opt/oracle/product/crs/11.2.0.3
Central Inventory : /opt/oracle/oraInventory
   from           : /opt/oracle/product/crs/11.2.0.3/oraInst.loc
OPatch version    : 11.2.0.3.0
OUI version       : 11.2.0.3.0
Log file location : /opt/oracle/product/crs/11.2.0.3/cfgtoollogs/opatch/opatch2012-03-23_11-24-51AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.

Because we want an automated patch installation without repsonding to the questions we create a response file for opatch now:

su - grid
export PATH=$ORACLE_HOME/OPatch:$PATH
$ORACLE_HOME/OPatch/ocm/bin/emocmrsp -output /opt/oracle/stage/opatch_response.rsp -no_banner

You do not need to provide an email address, just respond “Y” to the question that follows.

Time to apply the patch:

su -
cd /opt/oracle/stage
export PATH=/opt/oracle/product/crs/11.2.0.3/OPatch:$PATH
opatch auto /opt/oracle/stage -oh /opt/oracle/product/crs/11.2.0.3 -ocmrf /opt/oracle/stage/opatch_response.rsp

The output, if successful, looks like:

Executing /usr/bin/perl /opt/oracle/product/crs/11.2.0.3/OPatch/crs/patch112.pl -patchdir /opt/oracle -patchn stage -oh /opt/oracle/product/crs/11.2.0.3 -ocmrf /opt/oracle/stage/opatch_response.rsp -paramfile /opt/oracle/product/crs/11.2.0.3/crs/install/crsconfig_params
opatch auto log file location is /opt/oracle/product/crs/11.2.0.3/OPatch/crs/../../cfgtoollogs/opatchauto2012-03-23_11-34-03.log
Detected Oracle Restart install
Using configuration parameter file: /opt/oracle/product/crs/11.2.0.3/crs/install/crsconfig_params
Successfully unlock /opt/oracle/product/crs/11.2.0.3
patch /opt/oracle/stage/13348650  apply successful for home  /opt/oracle/product/crs/11.2.0.3
patch /opt/oracle/stage/13343438  apply successful for home  /opt/oracle/product/crs/11.2.0.3
ACFS-9459: ADVM/ACFS is not supported on this OS version: 'centos-release-5-8.el5.centos'
CRS-4123: Oracle High Availability Services has been started.

As CentOS is not a supported platform, you can ignore the ACFS-9459 message. Be aware that the Cluster Stack will get restarted.

Can can recheck your inventory now to be sure the patch has been applied:

su - grid
export PATH=$ORACLE_HOME/OPatch:$PATH
opatch lsinventory -details

Make a reboot test, to be sure everything is working:

su -
reboot

Login again and check the cluster stack:

su - grid
crsstat

Again, remember to take a snapshot of your Virtual Machine if you want to save your work or if you want to revert to this point. Delete the source files if you do not want to become your Virtual Machine too big before:

su - grid
cd /opt/oracle/stage/
rm -rf 13343438/ 13348650/ bundle.xml README.html README.txt

We will keep the zips and the response file for database patching in one of the next posts.

On your workstation create the snapshot:

vboxmanage snapshot oracleplayground take "after gi patch"
Advertisements

No Comments

Be the first to start the conversation!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s