Apply Patch (6864068 and 6602742)Installation Procedures

 

tomrrow  i will apply those patch to production  so write thist operation docment first.

the document cited >!  because  oracle document <> The article is too complex not suitable for reading

,so i write a simple document for opration!

 

   Order of Applying Patches

1.      To determine the release information for these databases:

Start SQL*Plus from the Oracle home directory:

 

sqlplus /nolog

SQL> conn / as sysdba

The output is:

Connected

Check the version,Enter the following command:

 

SQL> select * from v$version;

 

 

 

2.      To determine if you have an earlier CPU installed, run:

 

% ORACLE_HOME%/OPatch/opatch lsinventory

opatch lsinventory

If patch 5881721 (CPUJan2007), 5901891 (CPUApr2007), or 6064331 (CPUApr2007 Merge) is    present, then run the appropriate rollback command

5881721 (CPUJan2007): opatch rollback -id 5881721

5901891 (CPUApr2007): opatch rollback -id 5901891

6064331 (CPUApr2007 Merge): opatch rollback -id 6064331

You do not need to run catcpu_rollback.sql after you run the above rollback command.

 

3.      Shut down all services in the Oracle home on the every  node

emctl stop dbconsole
isqlplusctl stop
lsnrctl stop

srvctl stop service -d db_name

srvctl stop instance -d db_name -i instance_name
srvctl stop asm -n  nodehostname
stop nodeapps -n nodehostname
crsctl stop crs

check all oracle process had be stop

ps –ef|grep ora

export PATH=$PATH:/usr/ccs/bin

export OBJECT_MODE=32_64

In each node to repeat the above operation

4.      Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands:

 cd $ORACLE_HOME/patches

     cd 6602742

 opatch apply

To check accessibility to the inventory you can use the

opatch lsinventory

then apply another patch 6864068

 cd ..

     cd 6864068

     opatch napply -skip_subset -skip_duplicate

   

    In each node to repeat the above operation

 

5.      Post Installation Instructions

    Loading Modified .sql Files into the Database

If there is a database in the Oracle home that you are patching, start all database     instances running from this Oracle home.

For each database instance running on the Oracle home being patched, connect to the   database using SQL*Plus. Connect as SYSDBA and run the catcpu.sql script. as follows:

cd $ORACLE_HOME/cpu/CPUApr2008
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catcpu.sql
SQL> QUIT

catcpu.sql reports any Invalid Objects, run the following commands:

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql

You can check for any invalid objects by executing following statement:

SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS= 'INVALID';

 

6.      Recompiling Views in the Database

Run the pre-check script. which reports the maximum number of views and objects that  may be recompiled:

Note that this script. is run with the database in upgrade mode, which restricts connections as SYSDBA

   cd $ORACLE_HOME/cpu/view_recompile
 
       sqlplus /nolog
   SQL> CONNECT / AS SYSDBA
   SQL> STARTUP NOMOUNT
   SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;
   SQL> SHUTDOWN
   SQL> STARTUP UPGRADE
   SQL> @view_recompile_jan2008cpu.sql
   SQL> SHUTDOWN;
   SQL> STARTUP NOMOUNT;
 
  Set the CLUSTER_DATABASE initialization parameter to TRUE:
 
  SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile;
 
  Restart the database:
 
   SHUTDOWN;
   STARTUP;
   QUIT

7.      Check the log file for any errors. The log file is in the current directory and is  named: vcomp__.log

 If any invalid objects were reported, run the utlrp.sql script. as follows:

  cd $ORACLE_HOME/rdbms/admin
  sqlplus /nolog
  SQL> CONNECT / AS SYSDBA
  SQL> @utlrp.sql

8.      Verify that the view recompilation has been performed for the database, by executing the following statement:

   SELECT * FROM registry$history where ID = '6452863';

If the view recompilation has been performed, this statement returns one row. If the view recompilation has not been performed, this statement returns no rows.

 

请使用浏览器的分享功能分享到微信等