Tuesday 14 February 2017

opatch?

OPATCH---->oracle patch

To apply Opatch conditions are database and listener both must be down.
As opatch will update your current ORACLE_HOME with patches.In single instance it is not possible.
But for RAC instance it is possible.As in RAC there will be two separate oracle home and 2 separate instances running one
instance on each oracle home.

Steps before applying patch:---

1)check database status:-

select name,open_mode,database_name,created,log_mode,platform_name from v$database;

NAME            OPEN_MODE       DATABASE_NAME   CREATED         LOG_MODE
--------------- --------------- --------------- --------------- ---------------
PLATFORM_NAME
---------------
VIS             READ WRITE      VIS.subbuapps 31-OCT-16       NOARCHIVELOG
                                .COM
Linux x86 64-bit


2)check the invalid objects:-

select owner,count(*) from dba_objects where status like '%INVALID% GROUP BY owner;

3)Check Opatch version using opatch -v
if opatch version is not compatible check the readmefile and download the latest version and uncompress in $ORACLE_HOME

4)Check oraInst.loc file pointing to your current $ORACLE_HOME or not.
cat /etc/oraInst.loc

inventory_loc=/u01/app/oracle/10.2.0/GlobalOraInv
inst_group=dba

5)If your server have more then one $ORACLE_HOME then comment the other $ORACLE_HOME and
uncomment the current $ORACLE_HOME

inventory must point to the current $ORACLE_HOME which is getting patched.

6)Unzip the patch,go to patch directory and then bring down the listener,bring down the database.

7)export Opatch
export PATH=$PATH:$HOME:$ORACLE_HOME/OPatch:/bin

8)Apply Patch
opatch apply


No comments:

Post a Comment