CPU Patching Instructions for 11.1.0.6 11.1.0.7
-
Upload
banalakalyan -
Category
Documents
-
view
5 -
download
0
description
Transcript of CPU Patching Instructions for 11.1.0.6 11.1.0.7
Applying CPU to Oracle 11.1.0.6/11.1.07
Contents
1. Specification
2. Patch Installation Instructions for Oracle Database Release 11.1.0.6/11.1.0.7 In Non-RAC Environment
Patch Installation Instructions for a Non-RAC Environment
Post Installation Instructions for a Non-RAC Environment
3. Patch Installation Instructions for Oracle Database Release 11.1.0.6/11.1.0.7 In –RAC Environment
Patch Installation Instructions for a RAC Environment
Post Installation Instructions for a RAC Environment
4. Post Installation Instructions for Databases Created or Upgraded after Installation of CPU in the Oracle Home
Specification
Critical patch update (CPU) patches are cumulative, which means fixes from previous Oracle security alerts and critical patch updates are included.
Patch Installation Instructions for Oracle Database Release 11.1.0.6/11.1.0.7 in Non-RAC Environment
Patch Installation Instructions for a Non-RAC Environment
Ensure that your Oracle Database installation is the same release for which you are applying this patch.
S. No Step Action1 Shutdown ASM instance If you are patching an ASM instance, shut down all Oracle Database instances
that use this ASM instance.
To see which Oracle Database instances are connected to this ASM instance, query the V$ASM_CLIENT view.
2 Shut down all instances and listeners associated with the Oracle home that you are updating.
3 Ensure that the $PATH has the following executables: make, ar, ld, and nm.
On many operating systems, they are located in /usr/ccs/bin, in which case you can set your PATH as follows:export PATH=$PATH:/usr/ccs/bin
4 Apply the patch Set your current directory to the directory where the patch is located and then run the Opatch utility by entering the following commands:
unzip p8534378_111060_<platform>.zip
cd 8534378
opatch napply –skip_subset –skip_duplicate
Post Installation Instructions for a Non-RAC Environment
Do not perform the operations in this section on ASM instances. However, if you shut down ASM as part of applying the CPU, you must
start ASM instances before you can perform any of the actions in this section on any database instances.
Loading Modified .sql Files into the Database
S. No Step Action1 For each database instance running on the Oracle
home being patched run the catbundle.sql script.
Connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:cd $ORACLE_HOME/rdbms/adminsqlplus /nologSQL> CONNECT / AS SYSDBASQL> STARTUPSQL> @catbundle.sql cpu applySQL> QUIT
If you are not applying CPU on top of a previous CPU, enter the following statements after running the catbundle.sql script. (If you are applying CPU on top of a previous CPU, you do not need to enter the following statements.)
cd $ORACLE_HOME/rdbms/adminsqlplus /nologSQL> CONNECT / AS SYSDBASQL> @utlrp.sql
2 Check the logs Check the following log files in $ORACLE_HOME/cfgtoollogs/catbundle any errors:
catbundle_CPU_<database SID>_APPLY_<TIMESTAMP>.logcatbundle_CPU_<database sid>_GENERATE_<TIMESTAMP>.log
where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS.
Recompiling Views in the Database
S. No Step Action1 Verify if recompile is already performed Check whether view recompilation has already 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 or more rows. If the view recompilation has not been performed, this statement returns no rows.
2 Recompile the views in the database Run the pre-check script which reports the maximum number of views and objects that may be recompiled:
cd $ORACLE_HOME/cpu/view_recompilesqlplus /nologSQL> CONNECT / AS SYSDBASQL> @recompile_precheck_jan2008cpu.sqlSQL> 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.
The database is not in a RAC environment
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_recompilesqlplus /nologSQL> CONNECT / AS SYSDBASQL> SHUTDOWN IMMEDIATESQL> STARTUP UPGRADESQL> @view_recompile_ jan2008cpu.sqlSQL> SHUTDOWN;SQL> STARTUP;SQL> QUIT
3Check logs Check the log file for any errors. The log file is in the current directory and is
named: vcomp_<sid>_<timestamp>.log4 Check Invalid objects If any invalid objects were reported, run the utlrp.sql script as follows:
cd $ORACLE_HOME/rdbms/adminsqlplus /nologSQL> CONNECT / AS SYSDBASQL> @utlrp.sql
Then, manually recompile any invalid objects. For example:
SQL> alter package schemaname.packagename compile;
Patch Installation Instructions for Oracle Database Release 11.1.0.6/11.1.0.7 in –RAC Environment
Patch Installation Instructions for a RAC Environment
Ensure that your Oracle Database installation is the same release for which you are applying this patch.
S. No Step Action1 Instance shutdown Shut down the instance on one node. (Shut down all RDBMS instances before
any ASM instances.)
2 Shut down all nodeapps services on the node in above step1
srvctl stop nodeapps -n <node-name>
3 Apply the patch on the node in step1 Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands:unzip p8534378_111060_<platform>.zipcd 8534378opatch napply -skip_subset -skip_duplicate -local
4 Start all nodeapps services on the node in step 1. (Note that ASM is a nodeapps service.) srvctl start nodeapps -n <node-name>
5 Start the instance on the node in step 3
6 Apply Patch on all the nodes Repeat steps 1-5 on all remaining nodes in the cluster.
Post Installation Instructions for a RAC Environment
Do not perform the operations in this section on ASM instances. However, if you shut down ASM as part of applying the CPU, you must
start ASM instances before you can perform any of the actions in this section on any database instances.
Loading Modified .sql Files into the Database
S. No Step Action1 For each database instance running on the Oracle
home being patched run the catbundle.sql script.
Connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:
cd $ORACLE_HOME/rdbms/adminsqlplus /nologSQL> CONNECT / AS SYSDBASQL> STARTUPSQL> @catbundle.sql cpu applySQL> QUIT
If you are not applying CPU on top of a previous CPU, enter the following statements after running the catbundle.sql script. (If you are applying CPU on top of a previous CPU, you do not need to enter the following statements.)
cd $ORACLE_HOME/rdbms/adminsqlplus /nologSQL> CONNECT / AS SYSDBASQL> @utlrp.sql
2 Check the logs Check the following log files in $ORACLE_HOME/cfgtoollogs/catbundle any errors:
catbundle_CPU_<database SID>_APPLY_<TIMESTAMP>.logcatbundle_CPU_<database sid>_GENERATE_<TIMESTAMP>.log
where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS.
Recompiling Views in the Database
S. No Step Action1 Verify if recompile is already performed Check whether view recompilation has already 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 or more rows. If the view recompilation has not been performed, this statement returns no rows.
2 Recompile the views in the database The database is in a RAC environment, run the view recompilation script as follows. Note that this script is run with the database in upgrade mode, which restricts connections as SYSDBA.
cd $ORACLE_HOME/cpu/view_recompilesqlplus /nologSQL> CONNECT / AS SYSDBASQL> STARTUP NOMOUNT
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;SQL> SHUTDOWNSQL> STARTUP UPGRADESQL> @view_recompile_ jan2008cpu.sqlSQL> SHUTDOWN;SQL> STARTUP NOMOUNT;
Set the CLUSTER_DATABASE initialization parameter to TRUE:
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile;
Restart the database:
SQL> SHUTDOWN;SQL> STARTUP;SQL> QUIT
3 Check logsCheck the log file for any errors. The log file is in the current directory and is named: vcomp_<sid>_<timestamp>.log
4 Check Invalid objects If any invalid objects were reported, run the utlrp.sql script as follows:
cd $ORACLE_HOME/rdbms/adminsqlplus /nologSQL> CONNECT / AS SYSDBASQL> @utlrp.sql
Then, manually recompile any invalid objects. For example:
SQL> alter package schemaname.packagename compile;
Post Installation Instructions for Databases Created or Upgraded after Installation of CPU in the Oracle Home
These instructions are for both non-RAC environments and RAC environments when a database is created or upgraded after the installation of CPU.
You must execute the steps in Section "Loading Modified .sql Files into the Database" for any new database only if it was created by any of the following methods:
Using DBCA (Database Configuration Assistant) to select a sample database (General, Data Warehouse, Transaction Processing)
Using a script that was created by DBCA that creates a database from a sample database
Cloning a database that was created by either of the two preceding methods,
and if Section "Loading Modified .sql Files into the Database" was not executed after CPU was applied.
Upgraded databases require that you perform the steps in Section "Recompiling Views in the Database" if these steps have not previously been performed; otherwise, no post-installation steps need to be performed.
Generic Issue
The following is a generic issues common to all platforms.
Issue If this is the first CPU installed in this Oracle home or if the entire CPU has been deinstalled, then run cpu_root.sh as
root to complete the installation. To run cpu_root.sh, go to the directory where you downloaded the patch (if you are not already in that directory) and enter the following command:
sh cpu_root.sh