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