How to Apply CPU OCT 2008
Reading time: 6 - 10 minutes
Applying CPU OCT 2008 On TS03 & TS04
====================================
MACHINE : TESTDB1
ORACLE VERSION: 10.2.0.4
EDITION : STANDARD
INSTANCES : ORCL
STAGING AREA : /media_store/oracle/CPU_OCT_2008
1.Move the old opatch with different name as CPU OCT 2008 requires latest OPatch ( 10.2.0.4.4 )
$mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch.old
2.Download latest OPatch 10.2.0.4.4 from Patch 6880880 ( Please select appropriate platform as its platform specific )
Patch name must be p6880880_102000_Linux-x86-64.zip
3.Unzip the OPatch.
[oracleoracle]$ unzip p6880880_102000_Linux-x86-64.zip
Archive: p6880880_102000_Linux-x86-64.zip
Length Date Time Name
-------- ---- ---- ----
0 09-16-08 07:27 OPatch/
0 09-16-08 07:27 OPatch/docs/
15590 05-21-08 19:59 OPatch/docs/FAQ
19191 05-21-08 19:59 OPatch/docs/Users_Guide.txt
12691 05-21-08 19:59 OPatch/docs/Prereq_Users_Guide.txt
7 05-21-08 20:38 OPatch/docs/tmp
0 09-15-08 08:42 OPatch/jlib/
727988 09-18-08 08:50 OPatch/jlib/opatch.jar
139066 09-15-08 11:03 OPatch/jlib/opatchutil.jar
121998 05-21-08 19:59 OPatch/jlib/opatchprereq.jar
72589 05-21-08 19:59 OPatch/jlib/opatchactions.jar
724830 05-21-08 19:59 OPatch/jlib/opatchbackup.jar
0 05-21-08 19:59 OPatch/opatchprereqs/
0 05-21-08 19:59 OPatch/opatchprereqs/opatch/
30414 05-21-08 19:59 OPatch/opatchprereqs/opatch/opatch_prereq.xml
2170 05-21-08 19:59 OPatch/opatchprereqs/opatch/rulemap.xml
99 05-21-08 19:59 OPatch/opatchprereqs/opatch/runtime_prereq.xml
0 05-21-08 19:59 OPatch/opatchprereqs/oui/
534 05-21-08 19:59 OPatch/opatchprereqs/oui/knowledgesrc.xml
236 05-21-08 19:59 OPatch/opatchprereqs/prerequisite.properties
7625 05-21-08 19:59 OPatch/opatch
7637 05-21-08 19:59 OPatch/opatch.bat
2571 05-21-08 19:59 OPatch/opatch.pl
49 05-21-08 19:59 OPatch/opatch.ini
19803 05-21-08 19:59 OPatch/emdpatch.pl
3955 09-15-08 12:07 OPatch/README.txt
0 09-16-08 07:17 OPatch/ocm/
22164101 09-16-08 07:16 OPatch/ocm/ocm.zip
0 09-03-08 21:01 OPatch/ocm/lib/
2489166 09-03-08 21:01 OPatch/ocm/lib/emocmutl.jar
0 09-03-08 20:52 OPatch/ocm/bin/
8072 08-06-08 05:36 OPatch/ocm/bin/emocmrsp
4.Move new OPatch to Oracle Home.
$mv OPatch $ORACLE_HOME/
5.Check the new OPatch version to make sure you have correct OPatch.Its very very necessary to have required opatch else it may break you CPU installation.
$$ORACLE_HOME/OPatch/opatch version
Invoking OPatch 10.2.0.4.4
OPatch Version: 10.2.0.4.4
OPatch succeeded.
6.Set the environment.
$export ORACLE_HOME=/apps1/oracle02/u21/app/oracle/product/10.2.0/db_1
$export PATH=$ORACLE_HOME/OPatch:$PATH7.Check the inventory to know previously applied patches.
$opatch lsinv -invPtrLoc $ORACLE_HOME/oraInst.loc
Invoking OPatch 10.2.0.4.4Oracle Interim Patch Installer version 10.2.0.4.4
Copyright (c) 2007, Oracle Corporation. All rights reserved.Oracle Home : /apps1/oracle02/u21/app/oracle/product/10.2.0/db_1
Central Inventory : /apps1/oracle02/u21/app/oracle/oraInventory
from : /apps1/oracle02/u21/app/oracle/product/10.2.0/db_1/oraInst.loc
OPatch version : 10.2.0.4.4
OUI version : 10.2.0.4.0
OUI location : /apps1/oracle02/u21/app/oracle/product/10.2.0/db_1/oui
Log file location : /apps1/oracle02/u21/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2008-11-12_14-36-45PM.logLsinventory Output file location : /apps1/oracle02/u21/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2008-11-12_14-36-45PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (2):Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3 10.2.0.4.0
There are 2 products installed in this Oracle Home.No Interim patches :
OPatch succeeded.
8.Make sure that all instances,listener & dbconsole running for Oracle home being patched are down.
9.Apply CPU Patch.
$cd <Staging Area>
$opatch napply -skip_subset -skip_duplicate -invPtrLoc $ORACLE_HOME/oraInst.loc
10.Post installation requirement.(PLEASE NOTE THAT POST INSTALLATION REQUIREMENT NEEDS TO RUN ON ALL ORACLE IN
STANCE WHICH ARE SHARING THE COMMON ORACLE HOME.iN OUR CASE TS03 & TS04)
Loading Modified .sql Files into the Database
10.1 To load modified .sql files into the database, follow these steps:
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 catbundle.sql script as follows:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql cpu apply
SQL> QUIT
For information about the catbundle.sql script, see OracleMetaLink Note 605795.1 Introduction to Oracle Database catbundle.sql.
Check the following log files in $ORACLE_HOME/cfgtoollogs/catbundle any errors:
catbundle_CPU_<database SID>_APPLY_<TIMESTAMP>.log
catbundle_CPU_<database sid>_GENERATE_<TIMESTAMP>.log
10.2 Recompiling Views in the Database
You must recompile views for all database.
If you want to check whether view recompilation has already been performed for the database, execute the following statement.
SELECT * FROM registry$history where ID = '6452863';
If the view recompilation has been performed, this statement returns one or more rows. If the view recompilation has not been performed, this statement returns no rows.
To recompile the views in the database, follow these steps:
Run the pre-check script , which reports the maximum number of views and objects that may be recompiled:
cd $ORACLE_HOME/cpu/view_recompile
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @recompile_precheck_jan2008cpu.sql
SQL> QUIT
The purpose of this step is to help you determine whether view recompilation should be done at the same time as the CPU install, or scheduled later.
Run the view recompilation script. 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> SHUTDOWN IMMEDIATE
SQL> STARTUP UPGRADE
SQL> @view_recompile_jan2008cpu.sql
SQL> SHUTDOWN;
SQL> STARTUP;
SQL> QUIT
10.3 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
Then, manually recompile any invalid objects. For example:
SQL> alter package schemaname.packagename compile;
Final Result
============
[oracle@oracle]$ /apps1/oracle02/u21/app/oracle/product/10.2.0/db_1/OPatch/opatch lsinv -invPtrLoc /apps1/oracle02/u21/app/oracle/product/10.2.0/db_1/oraInst.loc
Invoking OPatch 10.2.0.4.4Oracle Interim Patch Installer version 10.2.0.4.4
Copyright (c) 2007, Oracle Corporation. All rights reserved.Oracle Home : /apps1/oracle02/u21/app/oracle/product/10.2.0/db_1
Central Inventory : /apps1/oracle02/u21/app/oracle/oraInventory
from : /apps1/oracle02/u21/app/oracle/product/10.2.0/db_1/oraInst.loc
OPatch version : 10.2.0.4.4
OUI version : 10.2.0.4.0
OUI location : /apps1/oracle02/u21/app/oracle/product/10.2.0/db_1/oui
Log file location : /apps1/oracle02/u21/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2008-11-12_14-36-45PM.logLsinventory Output file location : /apps1/oracle02/u21/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2008-11-12_14-36-45PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (2):Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3 10.2.0.4.0
There are 2 products installed in this Oracle Home.Interim patches (12) :
Patch 7375644 : applied on Tue Nov 11 13:25:02 GMT 2008
Created on 16 Sep 2008, 01:16:02 hrs PST8PDT
Bugs fixed:
7375644, 7150470Patch 7375617 : applied on Tue Nov 11 13:24:59 GMT 2008
Created on 16 Sep 2008, 01:15:59 hrs PST8PDT
Bugs fixed:
7375617Patch 7375613 : applied on Tue Nov 11 13:24:56 GMT 2008
Created on 16 Sep 2008, 01:15:57 hrs PST8PDT
Bugs fixed:
7375613Patch 7375611 : applied on Tue Nov 11 13:24:53 GMT 2008
Created on 16 Sep 2008, 01:15:53 hrs PST8PDT
Bugs fixed:
7375611Patch 7197583 : applied on Tue Nov 11 13:24:49 GMT 2008
Created on 3 Jul 2008, 02:11:22 hrs PST8PDT
Bugs fixed:
7197583Patch 7155254 : applied on Tue Nov 11 13:24:43 GMT 2008
Created on 3 Jul 2008, 02:10:57 hrs PST8PDT
Bugs fixed:
7155254Patch 7155253 : applied on Tue Nov 11 13:23:47 GMT 2008
Created on 3 Jul 2008, 02:10:55 hrs PST8PDT
Bugs fixed:
7155253Patch 7155252 : applied on Tue Nov 11 13:23:01 GMT 2008
Created on 3 Jul 2008, 02:10:54 hrs PST8PDT
Bugs fixed:
7155252Patch 7155251 : applied on Tue Nov 11 13:22:57 GMT 2008
Created on 3 Jul 2008, 02:10:52 hrs PST8PDT
Bugs fixed:
7155251Patch 7155250 : applied on Tue Nov 11 13:22:53 GMT 2008
Created on 3 Jul 2008, 02:10:51 hrs PST8PDT
Bugs fixed:
7155250Patch 7155249 : applied on Tue Nov 11 13:22:49 GMT 2008
Created on 3 Jul 2008, 02:10:48 hrs PST8PDT
Bugs fixed:
7155249Patch 7155248 : applied on Tue Nov 11 13:22:46 GMT 2008
Created on 3 Jul 2008, 02:10:38 hrs PST8PDT
Bugs fixed:
7155248--------------------------------------------------------------------------------
OPatch succeeded.
ixYdk3 hi nice site thx http://peace.com
This information really made me easy to work. Now i am very much comfortable with the cpu patch applying.
Thanks a lot for this valuable guidence…….
Pankaj