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 -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

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
drwxr-xr-x 8 grid oinstall      4096 Sep 22  2011 grid
-rw-r--r-- 1 grid oinstall  32510817 Mar 23 10:54
-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
opatch lsinventory -detail -oh $ORACLE_HOME

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

Oracle Interim Patch Installer version
Copyright (c) 2012, Oracle Corporation.  All rights reserved.
Oracle Home       : /opt/oracle/product/crs/
Central Inventory : /opt/oracle/oraInventory
   from           : /opt/oracle/product/crs/
OPatch version    :
OUI version       :
Log file location : /opt/oracle/product/crs/
Lsinventory Output file location : /opt/oracle/product/crs/
Installed Top-level Products (1): 
Oracle Grid Infrastructure                                 
There are 1 products installed in this Oracle Home.
Installed Products (88): 
Agent Required Support Files                               
Assistant Common Files                                     
Automatic Storage Management Assistant                     
Bali Share                                                 
Buildtools Common Files                                    
Character Set Migration Utility                            
Cluster Ready Services Files                               
Cluster Verification Utility Common Files                  
Cluster Verification Utility Files                         
Database SQL Scripts                                       
Deinstallation Tool                                        
Enterprise Manager Common Core Files                       
Enterprise Manager Common Files                            
Enterprise Manager plugin Common Files                     
Expat libraries                                             
HAS Common Files                                           
HAS Files for DB                                           
Installation Common Files                                  
Installation Plugin Files                                  
Installer SDK Component                                    
LDAP Required Support Files                                
OLAP SQL Scripts                                           
Oracle Clusterware RDBMS Files                             
Oracle Configuration Manager Deconfiguration               
Oracle Containers for Java                                 
Oracle Core Required Support Files                         
Oracle Database 11g                                        
Oracle Database 11g Multimedia Files                       
Oracle Database Deconfiguration                            
Oracle Database User Interface                             
Oracle Database Utilities                                  
Oracle DBCA Deconfiguration                                
Oracle Extended Windowing Toolkit                          
Oracle Globalization Support                               
Oracle Globalization Support                               
Oracle Grid Infrastructure                                 
Oracle Help For Java                                        
Oracle Ice Browser                                          
Oracle Internet Directory Client                           
Oracle Java Client                                         
Oracle JDBC/OCI Instant Client                             
Oracle JDBC/THIN Interfaces                                
Oracle JFC Extended Windowing Toolkit                      
Oracle JVM                                                 
Oracle LDAP administration                                 
Oracle Locale Builder                                      
Oracle Multimedia                                          
Oracle Multimedia Client Option                            
Oracle Multimedia Java Advanced Imaging                    
Oracle Multimedia Locator                                  
Oracle Multimedia Locator RDBMS Files                      
Oracle Net                                                 
Oracle Net Listener                                        
Oracle Net Required Support Files                          
Oracle Netca Client                                        
Oracle Notification Service                                
Oracle Notification Service (eONS)                         
Oracle One-Off Patch Installer                             
Oracle Quality of Service Management (Client)              
Oracle Quality of Service Management (Server)              
Oracle RAC Deconfiguration                                 
Oracle RAC Required Support Files-HAS                      
Oracle Recovery Manager                                    
Oracle Security Developer Tools                            
Oracle Text Required Support Files                         
Oracle Universal Installer                                 
Oracle USM Deconfiguration                                 
Oracle Wallet Manager                                      
Parser Generator Required Support Files                    
Perl Interpreter                                           
Perl Modules                                               
PL/SQL Embedded Gateway                                    
Platform Required Support Files                            
Precompiler Required Support Files                         
RDBMS Required Support Files                               
RDBMS Required Support Files for Instant Client            
RDBMS Required Support Files Runtime                       
Required Support Files                                     
Secure Socket Layer                                        
SQL*Plus Files for Instant Client                          
SQL*Plus Required Support Files                            
SSL Required Support Files for InstantClient               
Sun JDK                                                   
Universal Storage Manager Files                            
XDK Required Support Files                                 
XML Parser for Java                                        
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
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
Copyright (c) 2012, Oracle Corporation.  All rights reserved.
PREREQ session
Oracle Home       : /opt/oracle/product/crs/
Central Inventory : /opt/oracle/oraInventory
   from           : /opt/oracle/product/crs/
OPatch version    :
OUI version       :
Log file location : /opt/oracle/product/crs/
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
$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/$PATH
opatch auto /opt/oracle/stage -oh /opt/oracle/product/crs/ -ocmrf /opt/oracle/stage/opatch_response.rsp

The output, if successful, looks like:

Executing /usr/bin/perl /opt/oracle/product/crs/ -patchdir /opt/oracle -patchn stage -oh /opt/oracle/product/crs/ -ocmrf /opt/oracle/stage/opatch_response.rsp -paramfile /opt/oracle/product/crs/
opatch auto log file location is /opt/oracle/product/crs/
Detected Oracle Restart install
Using configuration parameter file: /opt/oracle/product/crs/
Successfully unlock /opt/oracle/product/crs/
patch /opt/oracle/stage/13348650  apply successful for home  /opt/oracle/product/crs/
patch /opt/oracle/stage/13343438  apply successful for home  /opt/oracle/product/crs/
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
opatch lsinventory -details

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

su -

Login again and check the cluster stack:

su - grid

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"

No Comments

Be the first to start the conversation!

Leave a Reply

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

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

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.