Friday, October 16, 2009

How to apply CPU (Critical Patch Update )?

How to apply CPU (Critical Patch Update )Jul2006 in database server(DB Version 10.2.0.1)?
This document describes to apply CPU patch Jul2006 in Linux(DB Version 10.2.0.1).Download following patch from Metalink 5225798.

Critical patch update (CPU) patches are cumulative, which means fixes from previous Oracle security alerts and critical patch updates are included.

You must use the OPatch utility release 10.2.0.1.2. You can download it from OracleMetaLink with patch 4898608
To check accessibility to the inventory you can use the command
$ opatch lsinventory

Patch Installation for 10.2.0.1 release database:
Step 1: Ensure that your Oracle Database installation is the same release for which you are applying this patch. In other words, only apply the Release 10.2.0.1 CPUJul2006 patch to an Oracle Database Release 10.2.0.1.

Step 2: Shut down all instances and listeners associated with the Oracle home that you are updating

Step 3: Ensure that the $PATH has the following executables: make, ar, ld, and nm.

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

$cd 5225798
$opatch apply
Post installation procedure:
After applying that patche
Step 1: Start all database instances running from the Oracle home that you are patching
Step 2: For each database instance running of 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/CPUJul2006
$sqlplus "/as sysdba"
SQL> STARTUP
SQL> @catcpu.sql
SQL> QUIT

Step 3: Check the log file for any errors

Step 4:
If catcpu.sql reports any Invalid Objects, run the following commands:
$cd $ORACLE_HOME/rdbms/admin
$sqlplus "/as sysdba"
SQL> STARTUP
SQL> @utlrp.sql
You can check for any invalid objects by executing following statement:
SQL> SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS= 'INVALID';

Rollback Patch:
Step 1: Set your current directory to the directory where the patch is located, for example:
$cd 5225798

Step 2: Shut down all instances and listeners associated with the Oracle home that you are updating. Run the OPatch utility using the rollback argument. For example:

$opatch rollback -id 5225798

Post Deinstallation Instructions:

Step 1: Start all database instances running from the Oracle home that you had patched

Step 2: For each database instance running out of the ORACLE_HOME that was patched, connect to the database using SQL*Plus as SYSDBA and run catcpu_rollback.sql as follows:
$cd $ORACLE_HOME/cpu/CPUJul2006
$sqlplus "/as sysdba"
SQL> STARTUP
SQL> @catcpu_rollback.sql
SQL> QUIT

Step 3: Inspect the logfile for any errors.
If catcpu_rollback.sql reports any Invalid Objects, Oracle recommends that you compile the invalid objects as follows:

$cd $ORACLE_HOME/rdbms/admin
sqlplus "/as sysdba"
SQL> STARTUP
SQL> @utlrp.sql

You can check for any invalid objects by executing following statement:
SQL> SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS = 'INVALID';

No comments: