You are on page 1of 3


Patching and upgrading:
Patches are two types.
1. Standalone patch (means one of the patch)
2. Patch set(combination of patches)
In ordered to apply patches we need to download patches from Meta link

Unzip the patch set:

$unzip ******.zip
$cd folder name
$vi README.txt
$opatch apply #most of the time we dont need to shutdown the database.

To know the oracle inventory:

$cd /etc
$ls oraInst.loc
$cat oraInst.loc
On one physical server we have
Oracle will maintain the oraInst.loc file on each ORACLE_HOME.
$ls oraInst.loc
$cd OPatch
$ps ef |grep pmon
$sqlplus / as sysdba
Sql> shutdown immediate;
$cd patch location
$which opatch
$which opatch
$opatch apply
If oraInst.loc is not in default location we need to provide a path to it when
we are applying patch.
#mv /etc/oraInst.loc /etc/oraInst.loc.bkp
$opatch apply help
$opatch lsinventory
If we move oracle home location oraInst.loc file then we will get error.
$mv $ORACLE_HOME/oraInst.loc $ORACLE_HOME/oraInst.loc.bkp
$optach lsinventory
Rename file as oraInst.loc
$mv $ORACLE_HOME/oraInst.loc.bkp $ORACLE_HOME/oraInst.loc
$opatch apply
$opatch lsinventory
$sqlplus / as sysdba
Sql> startup
Upgrading from to
Download the patch:
Copy the patch to Oracle server.
Sql>select * from v$version;
Make sure all the processes and instance is down when we are applying the

Before applying the patch we have to backup the oracle software and oracle
$unzip *****.zip
$cd *****
It will just upgrade the oracle binaries from to
$sqlplus / as sysdba
Sql>select * from v$version;
Sql>startup upgrade;
Sql>shutdown immediate;
Sql>select * from v$version;
Sql>select object_name,count(*) from dba_objects where status=INVALID
group by object_name;