I could have applied the PSU earlier ( before creating the database ), but in real life this is the more likely scenario. As the patch sources are already in place:
su - oracle cd /opt/oracle/stage ls -la 6880880_112000_Linux-x86-64.zip p13348650_112030_Linux-x86-64.zip opatch_response.rsp
start with updating opatch:
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 and check the readme:
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 oracle oinstall 4096 Jan 14 17:08 13343438 drwxr-xr-x 5 oracle oinstall 4096 Jan 14 17:08 13348650 -rw-r--r-- 1 oracle oinstall 422 Jan 14 17:08 bundle.xml -rwxrwx--- 1 grid oinstall 621 Mar 23 11:31 opatch_response.rsp -rwxrwx--- 1 grid oinstall 32510817 Mar 23 10:54 p6880880_112000_Linux-x86-64.zip -rw-rw-r-- 1 oracle oinstall 107674 Jan 16 14:49 README.html -rw-r--r-- 1 oracle oinstall 21 Jan 14 17:08 README.txt
Because this patch contains both, the database and the grid patches, change to the database patch directory ( which is 13343438 ) and apply the patchset:
cd /opt/oracle/stage/13343438 srvctl stop listener -l listener_DB112 srvctl stop database -d DB112 export PATH=$ORACLE_HOME/OPatch:$PATH opatch lsinventory -detail -oh $ORACLE_HOME opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /opt/oracle/stage/13343438 -oh $ORACLE_HOME $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -output /opt/oracle/stage/opatch_response.rsp -no_banner opatch apply -ocmrf /opt/oracle/stage/opatch_response.rsp
The output should be very similar to this:
Oracle Home : /opt/oracle/product/base/126.96.36.199 Central Inventory : /opt/oracle/oraInventory from : /opt/oracle/product/base/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/base/18.104.22.168/cfgtoollogs/opatch/13343438_Mar_28_2012_15_35_47/apply2012-03-28_15-35-47PM_1.log Applying interim patch '13343438' to OH '/opt/oracle/product/base/22.214.171.124' Verifying environment and performing prerequisite checks... All checks passed. Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/opt/oracle/product/base/126.96.36.199') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Patching component oracle.rdbms.rsf, 188.8.131.52.0... Patching component oracle.rdbms, 184.108.40.206.0... Patching component oracle.rdbms.dbscripts, 220.127.116.11.0... Verifying the update... Patch 13343438 successfully applied Log file location: /opt/oracle/product/base/18.104.22.168/cfgtoollogs/opatch/13343438_Mar_28_2012_15_35_47/apply2012-03-28_15-35-47PM_1.log OPatch succeeded.
Patch ( almost ) applied.
Perhaps you noticed that opatch creates a new directory under you ORACLE_HOME which is called .patch_storage:
ls -la /opt/oracle/product/base/22.214.171.124/.patch_storage/ total 28 drwxr-xr-x 4 oracle oinstall 4096 Mar 28 15:38 . drwxrwx--- 75 oracle oinstall 4096 Mar 28 15:36 .. drwxr-xr-x 4 oracle oinstall 4096 Mar 28 15:38 13343438_Jan_3_2012_02_50_27 -rw-r--r-- 1 oracle oinstall 336 Mar 28 15:36 interim_inventory.txt -rw-r--r-- 1 oracle oinstall 92 Mar 28 15:36 LatestOPatchSession.properties -rw-r--r-- 1 oracle oinstall 0 Mar 28 15:38 patch_free -rw-r--r-- 1 oracle oinstall 51 Mar 28 15:36 record_inventory.txt drwxr-xr-x 2 oracle oinstall 4096 Mar 28 15:38 verify
Under no circumstances delete this files. You will not be able apply any futures patches if you do this. If you really experience space issues, you can do a cleanup of the files which are not needed:
opatch util cleanup
One step is still missing. It it very likely that oracle modified some SQL files with this patch, so one needs to apply this, too:
srvctl start listener -l listener_DB112 srvctl start database -d DB112 sqlplus / as sysdba @?/psu/126.96.36.199.1/catpsu.sql select * from registry$history;
Now there is a working Grid Infrastructure and database each patched to the ( currently ) latest release. If you did not export your Virtual Machine and did not create any snapshots I recommend to do an export now ( you need to shutdown your Virtual Machine for this ):
vboxmanage export "oracleplayground" --output oracleplayground.ovf
If you destroy the database or any parts of the grid infrastructure you are always able to bring it back in a few minutes.
Where to go from now ? This depends on you. If you are new to oracle there is a lot of literature out there, but the most important ( and at no cost ): Oracle Database Concepts . This should be your starting point.