Labels

Wednesday, May 11, 2011

Patch apply steps


Steps for July 2007 security Patch apply  on oracle 10.2.0.4 database

1) Required opatch version  – The required opatch version is 10.2.0.4.8 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
SQL>SHUTDOWN IMMEDIATE

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
startup
@catbundle.sql cpu apply
@utlrp.sql
quit

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
sqlplus
shutdown immediate
statup upgrade
@view_recompile_jan2008cpu.sql
shutdown immediate
startup;
quit

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

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