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 126.96.36.199.0 Copyright (c) 2012, Oracle Corporation. All rights reserved. Oracle Home : /opt/oracle/product/crs/188.8.131.52 Central Inventory : /opt/oracle/oraInventory from : /opt/oracle/product/crs/184.108.40.206/oraInst.loc OPatch version : 220.127.116.11.0 OUI version : 18.104.22.168.0 Log file location : /opt/oracle/product/crs/22.214.171.124/cfgtoollogs/opatch/opatch2012-03-23_11-14-23AM_1.log Lsinventory Output file location : /opt/oracle/product/crs/126.96.36.199/cfgtoollogs/opatch/lsinv/lsinventory2012-03-23_11-14-23AM.txt -------------------------------------------------------------------------------- Installed Top-level Products (1): Oracle Grid Infrastructure 188.8.131.52.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 184.108.40.206.0 Automatic Storage Management Assistant 220.127.116.11.0 Bali Share 18.104.22.168.0 Buildtools Common Files 22.214.171.124.0 Character Set Migration Utility 126.96.36.199.0 Cluster Ready Services Files 188.8.131.52.0 Cluster Verification Utility Common Files 184.108.40.206.0 Cluster Verification Utility Files 220.127.116.11.0 Database SQL Scripts 18.104.22.168.0 Deinstallation Tool 22.214.171.124.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 126.96.36.199.0 Expat libraries 188.8.131.52.1 HAS Common Files 184.108.40.206.0 HAS Files for DB 220.127.116.11.0 Installation Common Files 18.104.22.168.0 Installation Plugin Files 22.214.171.124.0 Installer SDK Component 126.96.36.199.0 LDAP Required Support Files 188.8.131.52.0 OLAP SQL Scripts 184.108.40.206.0 Oracle Clusterware RDBMS Files 220.127.116.11.0 Oracle Configuration Manager Deconfiguration 10.3.1.0.0 Oracle Containers for Java 18.104.22.168.0 Oracle Core Required Support Files 22.214.171.124.0 Oracle Database 11g 126.96.36.199.0 Oracle Database 11g Multimedia Files 188.8.131.52.0 Oracle Database Deconfiguration 184.108.40.206.0 Oracle Database User Interface 220.127.116.11.0 Oracle Database Utilities 18.104.22.168.0 Oracle DBCA Deconfiguration 22.214.171.124.0 Oracle Extended Windowing Toolkit 126.96.36.199.0 Oracle Globalization Support 188.8.131.52.0 Oracle Globalization Support 184.108.40.206.0 Oracle Grid Infrastructure 220.127.116.11.0 Oracle Help For Java 18.104.22.168.0 Oracle Ice Browser 22.214.171.124.0 Oracle Internet Directory Client 126.96.36.199.0 Oracle Java Client 188.8.131.52.0 Oracle JDBC/OCI Instant Client 184.108.40.206.0 Oracle JDBC/THIN Interfaces 220.127.116.11.0 Oracle JFC Extended Windowing Toolkit 18.104.22.168.0 Oracle JVM 22.214.171.124.0 Oracle LDAP administration 126.96.36.199.0 Oracle Locale Builder 188.8.131.52.0 Oracle Multimedia 184.108.40.206.0 Oracle Multimedia Client Option 220.127.116.11.0 Oracle Multimedia Java Advanced Imaging 18.104.22.168.0 Oracle Multimedia Locator 22.214.171.124.0 Oracle Multimedia Locator RDBMS Files 126.96.36.199.0 Oracle Net 188.8.131.52.0 Oracle Net Listener 184.108.40.206.0 Oracle Net Required Support Files 220.127.116.11.0 Oracle Netca Client 18.104.22.168.0 Oracle Notification Service 22.214.171.124.0 Oracle Notification Service (eONS) 126.96.36.199.0 Oracle One-Off Patch Installer 188.8.131.52.7 Oracle Quality of Service Management (Client) 184.108.40.206.0 Oracle Quality of Service Management (Server) 220.127.116.11.0 Oracle RAC Deconfiguration 18.104.22.168.0 Oracle RAC Required Support Files-HAS 22.214.171.124.0 Oracle Recovery Manager 126.96.36.199.0 Oracle Security Developer Tools 188.8.131.52.0 Oracle Text Required Support Files 184.108.40.206.0 Oracle Universal Installer 220.127.116.11.0 Oracle USM Deconfiguration 18.104.22.168.0 Oracle Wallet Manager 22.214.171.124.0 Parser Generator Required Support Files 126.96.36.199.0 Perl Interpreter 188.8.131.52.2 Perl Modules 184.108.40.206.1 PL/SQL 220.127.116.11.0 PL/SQL Embedded Gateway 18.104.22.168.0 Platform Required Support Files 22.214.171.124.0 Precompiler Required Support Files 126.96.36.199.0 RDBMS Required Support Files 188.8.131.52.0 RDBMS Required Support Files for Instant Client 184.108.40.206.0 RDBMS Required Support Files Runtime 220.127.116.11.0 Required Support Files 18.104.22.168.0 Secure Socket Layer 22.214.171.124.0 SQL*Plus 126.96.36.199.0 SQL*Plus Files for Instant Client 188.8.131.52.0 SQL*Plus Required Support Files 184.108.40.206.0 SSL Required Support Files for InstantClient 220.127.116.11.0 Sun JDK 18.104.22.168.03 Universal Storage Manager Files 22.214.171.124.0 XDK Required Support Files 126.96.36.199.0 XML Parser for Java 188.8.131.52.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 184.108.40.206.0 Copyright (c) 2012, Oracle Corporation. All rights reserved. PREREQ session Oracle Home : /opt/oracle/product/crs/220.127.116.11 Central Inventory : /opt/oracle/oraInventory from : /opt/oracle/product/crs/18.104.22.168/oraInst.loc OPatch version : 22.214.171.124.0 OUI version : 126.96.36.199.0 Log file location : /opt/oracle/product/crs/188.8.131.52/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/184.108.40.206/OPatch:$PATH opatch auto /opt/oracle/stage -oh /opt/oracle/product/crs/220.127.116.11 -ocmrf /opt/oracle/stage/opatch_response.rsp
The output, if successful, looks like:
Executing /usr/bin/perl /opt/oracle/product/crs/18.104.22.168/OPatch/crs/patch112.pl -patchdir /opt/oracle -patchn stage -oh /opt/oracle/product/crs/22.214.171.124 -ocmrf /opt/oracle/stage/opatch_response.rsp -paramfile /opt/oracle/product/crs/126.96.36.199/crs/install/crsconfig_params opatch auto log file location is /opt/oracle/product/crs/188.8.131.52/OPatch/crs/../../cfgtoollogs/opatchauto2012-03-23_11-34-03.log Detected Oracle Restart install Using configuration parameter file: /opt/oracle/product/crs/184.108.40.206/crs/install/crsconfig_params Successfully unlock /opt/oracle/product/crs/220.127.116.11 patch /opt/oracle/stage/13348650 apply successful for home /opt/oracle/product/crs/18.104.22.168 patch /opt/oracle/stage/13343438 apply successful for home /opt/oracle/product/crs/22.214.171.124 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"