Saturday, March 24, 2012

Opatch Helpers

How to tar the oracle home

cd /opt/oracle/product/10.2.0
tar -cvf - . |compress > /opt/oracle/admin/10203.beforeupgrade.tar.Z

cd /opt/oracle/oraInventory
tar -cvf - . |compress > /opt/oracle/admin/inventory_bkp_beforeupgrade.tar.Z






export PATH=$PATH:$ORACLE_HOME/OPatch

unzip p12879912_10204_.zip
cd 12879912
opatch napply -skip_subset -skip_duplicate 
 
 
 
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql cpu apply
SQL> -- Execute the next statement only if this is the first 10.2.0.4 CPU applied or this is the first CPU applied since CPUApr2011.
SQL> @utlrp.sql
SQL> QUIT 
 
 
SELECT * FROM registry$history where ID = '6452863';
 


cd $ORACLE_HOME/cpu/view_recompile
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @recompile_precheck_jan2008cpu.sql
SQL> QUIT 
 
 
  1. cd $ORACLE_HOME/cpu/view_recompile
    sqlplus /nolog
    SQL> CONNECT / AS SYSDBA
    SQL> SHUTDOWN IMMEDIATE
    SQL> STARTUP UPGRADE
    SQL> @view_recompile_jan2008cpu.sql
    SQL> SHUTDOWN;
    SQL> STARTUP;
    SQL> QUIT
    
  2. If the database is


    cd $ORACLE_HOME/rdbms/admin
    sqlplus /nolog
    SQL> CONNECT / AS SYSDBA
    SQL> @utlrp.sql
    
    Then, manually recompile any invalid
     
  3.  
  4. select action_time, action, version, id, comments from dba_registry_history order by action_time; 
 When i had faced the file copy failed alert , this below step was followed 
 
cp /backup/oracle/patching/12879912/8568398/files/lib/libjox10.a /opt/oracle/product/10.2.0/lib/libjox10.a
524     cd /opt/oracle/product/10.2.0/lib/
525     ls -lrt libjo*
526     mv libjox10.a libjox10.a_orig
527     history
oracle @ gvi0aitmt04p:itmdwp1
[/opt/oracle/product/10.2.0/lib]$ cp /backup/oracle/patching/12879912/8568398/files/lib/libjox10.a /opt/oracle/product/10.2.0/lib/libjox10.a
 
 
 
Copy failed from '//lib/libjox10.a'..
 
 
 
then it was sucess with the warnings 
 
 
 check opatch utility information

cd $ORACLE_HOME/OPatch/opatch lsinventory
 
 

No comments:

Post a Comment

How to Trouble shoot Logfile_sync wait event

   First  Identify and break down LGWR wait events. Query wait events for LGWR. In this instance LGWR sid is 3 (and usually it is). select s...