Opatch
Critical Patch Updates
CPU Critical Patch Update are security Fixes for oracle products including database
and are released in mid of following months
January
April
July
October
The Steps to follow are neatly mentioned in the Readme file that comes along with
the patch.
For applying the patch we use the utility Opatch provided by oracle
Opatch is Oracle Interim Patching Tool, it is used for patching the
installed oracle software, specifically the oracle home, opatch
is located at %ORACLE_HOME%\bin directory
When you start applying cpu patch, first the earlier patch is rolled back,
after which the current patch is applied automatically.
Windows
Following are the brief steps
1) Shut down the database instance cleanly
2) Backup up the %ORACLE_HOME%, and Program Files/Oracle/inventory folder.
3) Unzip the patch
4) Set the oracle_home environment variable, Check the earlier patch for the
ORACLE_HOME, by executing opatch lsinventory
5) Go to the extracted patch folder, execute Opatch apply, this will update
the oracle home.
6) Logs for the above are available at %Oracle_home%\cfgtoollogs\opatch\ direcory
in file with the installation time stamp.
7) After patch has been applied, startup the database.
8) Execute the catcpu.sql from the %ORACLE_HOME%\BUNDLE\Patch<Patch-ID> direcory
9) Follow the readme document for views recompilation.
History of all the commands executed with opach are maintained
in %Oracle_home%\cfgtoollogs\opatch\Opatch_history.txt
Backup
cat /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=dba
cd /u01/app
tar -pcvf /<backup path>/Backup_OraInv.tar oraInventory
gzip /<backup path>/Backup_OraInv.tar
echo $ORACLE_HOME
cd /u01/app/oracle/product
tar -pcvf
tar -pcvf /<BACKUP PATH>/oracle_home_bkup.tar 11.2.0.4
gzip /<BACKUP PATH>/oracle_home_bkup.tar
Opatch Application
opatch version
opatch lsinventory
opath appy
./datapatch verbose