Wednesday, May 11, 2011

Patch apply steps

Steps for July 2007 security Patch apply  on oracle database

1) Required opatch version  – The required opatch version is or higher. This thing you can check from patch read manual.
Check the opatch version and confirm that the patch can be applied
#opatch version

2) Compile all the invalid objects by running utlrp.sql script
SQL> @ORACLE_HOME/rdbms/admin/utlrp.sql

3) Login to each individual databases and Shutdown all the databases

4) shutdown all the listners if it is running.
#lsnrctl stop
#lsnrctl status
5) Ensure no process in the name of oracle running under the oracle bin folder
#fuser -u $ORACLE_HOME/bin/oracle
   if you found any process running under its name then kill that session from its process id.
         #kill -9
6)visit to the patch directory and apply the patch
         #opatch napply -skip_subset   -skip_duplicate
Ensure no errors
7) check the erros if any $ORACLE_HOME/cfgtoologs/catbundle and start the database  and execeute the catbundle script
sqlplus / as sysdba
@catbundle.sql cpu apply

8) Now check in the registry file for any kind of error
  sql>select * from registry$history where id=6452863;

9)now upgrade the database and apply the view_recompile package as bug in the july 2007 patch

$cd $ORACLE_HOME/cpu/view_recompile
shutdown immediate
statup upgrade
shutdown immediate

10)Compile any invalid objects if found
cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba

11) Check any object is invalid. If u found any object in invalid state then recompile it.
example:- alter package compile;

No comments:

Post a Comment