Step by step how to apply PSU patch in Oracle

Patching and Upgradation

STEP 1:Check the operating system bit version (32 bit or 64 bit).

[[email protected] ~]$ uname -a

Linux 2.6.18-308.1.1.el5xen #1 SMP Fri Feb 17 17:11:09 EST 2012 x86_64 x86_64 x86_64 GNU/Linux.

here we can see it is Linux operating system with bit version x86_64.

If it is AIX server then use below command to check the bit version:

host03-oracle:/home/oracle(PROD)–>getconf -a | grep KERN

STEP 2:Check the oracle database version where we have to apply the patch.

There are various method to check the database version. I would be using lsinventory command because it shows many more details apart from database version.

[[email protected] ~]$ $ORACLE_HOME/OPatch/opatch lsinventory

Oracle Interim Patch Installer version
Copyright (c) 2013, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/product/
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/
OPatch version :
OUI version :
Log file location : /u01/app/oracle/product/

Lsinventory Output file location : /u01/app/oracle/product/

Installed Top-level Products (1):

Oracle Database 11g

There are 1 products installed in this Oracle Home.

the above is the only parical output. You can see lot of other detials as well.
Here you can notice two things:

  1. OPatch version :
  2. Oracle Database 11g :

I will cover the OPatch version in the later steps. Here we will concentrate only on oracle database version.

So from above two steps we have found that the operating system bit version is
x86_64 and database version is

STEP 3: Now check in the patch advisory document what patch oracle has released for You can find the patch advisory document for each quarter’s patch.

STEP 4: Download the patch from my oracle support(meta link). While downloading make sure you are downloading the patch for the correct operating system bit version.
Here we have to downlaod the patch for operating system bit version
x86_64 and database version

STEP 5. Move the downloaded zipped file into the server. And then unzip it using the appropriate unzip command into the server only.

STEP 6. Now you can unzip the file on your local system and open the read me file from it.

STEP 7: In the prerequisite section you can see the OPatch version required to apply this patch. It clearly mention if higher version of OPatch is needed or not. If so then download the OPatch and move it to the Oracle home. Make sure you rename or remove the old OPatch direcotry from the Oracle home. After this verify the new opatch version using lsinventory command. OPatch version will be changed from what was earlier. Now we are good to go.

STEP 8: Count the invalid object and make a note of it.

STEP 9: If listener is running from the home where we are go apply to patch then stop it otherwise no need to stop it. Many time it is running from Grid home. So no need to stop it if is running from Grid home.

STEP 10: If the server is being monitored by OEM grid control then put it into blackout.

STEP 11: Check the space into the mount point what oracle home is reffering to.

STEP 12: Shut down all the databases running from that home.

STEP 13: Go to the directory where you have moved and unzipped the patch:

[[email protected] tmp]$ cd p20760997_112030_Linux-x86-64
[[email protected] p14841437_112020_Linux-x86-64]$ ls -ltr
total 4
drwxr-xr-x 43 ralam0 ldap-users 4096 Feb 11 2013 20760997
[[email protected] p14841437_112020_Linux-x86-64]$ cd 20760997

STEP 14: Now issue the following command:

$$ORACLE_HOME/OPatch/opatch apply


OPatch succeeded

STEP 15: Start up the database and run the catbundle command for each databases running under that home.

$cd $ORACLE_HOME/rdbms/admin
SQL> @catbundle.sql psu apply

STEP 16: Run the utlrp.sql script to validate the objects.


STEP 17. Count the invalid object and make sure it is lesser or same than what it was in earlier count before patching.