Friday, 18 July 2014

Applying CPU/PSU/Opatch with DGMGRL in Oracle 10g..


============================
PART SECOND ON STANDBY SIDE
============================

1.Disable Log Shipping From Primary To Standby

----DGMGRL
connect sys/oracle@PRIMARY

edit database PRIMARY set property LogShipping='OFF';      // IF hang then first clean shutdown the database and restart server then after try;
show database verbose PRIMARY;
show database verbose STANDBY;

2.Shutdown All The Standby Database Services

alter database recover managed standby database cancel;
shutdown immediate
lsnrctl stop

3.Apply PSU patch to Standby Database


A) .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.


B) .Review Section 4, "Known Issues" before proceeding with this installation.


C) .Shut down all instances and listeners associated with the Oracle home that you are updating. For more information, see Oracle Database Administrator's Guide.


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

which make
which ar
which ld
which nm


E) .Check whether the java and jar executables are present in your Oracle home.

In a standard Oracle installation, java is available in $ORACLE_BASE/jre/JDK version/bin directory and jar is available in $ORACLE_HOME/jdk/bin directory. By default, the OPatch utility uses the executables from these locations. However, if they are located elsewhere, you can use the opatch apply command with the -jdk flag, and then specify the full path to the JDK to be used. For more information, refer to OPatch User's Guide, which is available with the OPatch utility distribution.


$ export PATH=$PATH:$HOME:$ORACLE_HOME/OPatch:/bin

$ opatch napply -skip_subset -skip_duplicate



F) .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



----startup mount
4.Mount The Standby Database and lsnrctl start


============================
PART SECOND ON PRIMARY SIDE
============================
5 .Stop Primary Database Services stop listener
6 .Apply CPU Patch To Primary Database
7 .Start Primary Database
8 .Re-Enable Log Shipping
9 .Put Standby Database In Recovery Mode
10.Verify The CPU Patch Application.



Post Installation Instructions for a Non-RAC Environment

Follow these steps:

A) .Start all database instances running from the Oracle home that you are patching.


B) .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:

(Due to changes in the installation scripts, it is no longer a requirement to startup the database in MIGRATE mode.)
cd $ORACLE_HOME/cpu/CPUJul2006
sqlplus /nolog
SQL> CONNECT /AS SYSDBA
SQL> STARTUP
SQL> @catcpu.sql
SQL> QUIT


C) .Check the log file for any errors. If there are errors, refer to Section 4, "Known Issues".


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



Note: For large numbers of objects, this compilation step can take some time. If you are applying this patch through the Enterprise Manager console,
you will be prompted to run this compilation script.


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


 cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT /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';




----DGMGRL
connect sys/oracle@PRIMARY

edit database PRIMARY set property LogShipping='ON';      // IF hang then first clean shutdown the database and restart server then after try;
show database verbose PRIMARY;
show database verbose STANDBY;

No comments: