Reference Doc for application 10.2.0.3 patch in ACL.
Patch to be applied - 10g release 2 (10.2.0.3) Patch Set 2 for AIX 5L Based Systems (64-Bit)
Operating System – IBM – AIX 5.3
Servers to be patched – Oradb1.applin.com, Oradb2.applin.com, oradbdr.applin.com
Notes-
The Oracle Clusterware software must be at the same or newer level as the Oracle software in the Oracle RAC Oracle home. Therefore, we should/must always upgrade Oracle Clusterware before we upgrade Oracle RAC.
We must apply this patch in an existing Oracle Database 10g Oracle home. To identify Oracle home directories, view the /etc/oratab file.
A. Steps to make systems ready to apply the patch -
Copy the p5337014_10203_AIX64-5L.zip patch set installation archive to a directory that is not the Oracle home directory or under the Oracle home directory.
Enter the following command to unzip and extract the installation files :
$ gunzip p5337014_10203_AIX64-5L.zip
3. Set the ORACLE_HOME and ORACLE_SID environment variables
$ ORACLE_HOME= /oracle/product/10.2/db_1
$ ORACLE_SID=GACL1 -- GACL2 incase of oradb2
$ export ORACLE_HOME ORACLE_SID
4. Lock all database Users which end users use to connect to database.
5. Take full database export using following command.
exp system/***** file=/backup/full_export/afternoon/export_`date +%F`.dmp log=/backup/full_export/afternoon/explog_`date +%F`.log statistics=none full=y grants=y compress=y constraints=y triggers=y indexes=y consistent = y recordlength=65535 feedback=10000
6. Take coldbackup of the database and copy that backup to Oradbtest.
7. Shut down all processes in the Oracle home on each node that might be accessing a database, for example Oracle Enterprise Manager Database Control or iSQL*Plus:.
$ emctl stop dbconsole
$ emctl stop agent
$ isqlplusctl stop
8. Shut down all services in the Oracle home on each node that might be accessing a database:
$ srvctl stop service -d GACL --Not required in Ambuja Cements Ltd.
9. Shutdown all Oracle RAC instances on all cluster nodes by entering following command.
$ srvctl stop database -d GACL
10. Shut down Automatic Storage Management instances on all cluster nodes by entering following command
$ srvctl stop asm –n oradb1 –i ASM1
$ srvctl stop asm –n oradb2 –i ASM2
11. Stop all node applications on all cluster nodes by entering the following command as a root user
# srvctl stop nodeapps -n oradb1
# srvctl stop nodeapps -n oradb2
12. Log in as the root user and shut down Oracle Clusterware processes by entering following command on all nodes as the root user
# CRS_home/bin/crsctl stop crs
Wait for sometimes as it takes sometime to stop
13. Check output of $ crs_stat –t
It must show everything offline.
B. Steps to apply patch on Clusterware.
1. Log in as the oracle user oradb1
execute $ exec /usr/bin/shh-agent $SHELL
execute $ /usr/bin/ssh-add -- Provide pass phrase at this command.
2. Log in as root and do the step 1 -- Provide pass phrase WHEN prompted
3. Log in as the oracle user oradb2
execute $ exec /usr/bin/shh-agent $SHELL
. execute $ /usr/bin/ssh-add -- Provide pass phrase at this command.
4. Log in as root and do the steps 2 and 3 -- Provide pass phrase WHEN prompted
5. Execute
On oradb1 -> $ ssh oradb2 date -- This should not ask for password
On oradb2 -> $ ssh oradb1 date -- This should not ask you password.
6. On Oradb1 enter the following commands to start Oracle Universal Installer, where patchset_directory is the directory where we have unzipped the patch set software in Step A.2
$ cd patchset_directory/Disk1
$ ./runInstaller
3. Run /usr/sbin/slibclean when prompted. – Run this as a root.
4. On the Welcome screen, click next.
4. In the Specify Home Details screen, select the name of the CRS home need to update, then click Next
5. Click Next when the Selected nodes screen appears.
6. On the Summary screen, click Install.
This screen lists all of the patches available for installation
7. When prompted, run the $CRS_HOME/instal/root102.sh script as the root user. Since we are applying the patch set to an Oracle RAC installation, we will run the root102.sh script on each node of the cluster
Root102.sh will start CRS, nodeapps, asm, listener, instances and database.
8. At the End of Installation screen, click Exit, then click Yes to exit from Oracle Universal Installer
9. Execute $ srvctl stop database –d GACL.
10. Check output of $ crs_stat –t , it should show two instances and the database down.
C. Steps to apply patch on Oracle RDBMS Home.
1. Check the output of $ crs_stat –t it should show following output
{node1:root}/oracle -> crs_stat –t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application OFFLINE OFFLINE
ora....B2.inst application OFFLINE OFFLINE
ora.ASMDB.db application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora.node1.gsd application ONLINE ONLINE node1
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip application ONLINE ONLINE node1
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE ONLINE node2
ora.node2.gsd application ONLINE ONLINE node2
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip application ONLINE ONLINE node2
2. Log in as the oracle user oradb1
execute $ exec /usr/bin/shh-agent $SHELL
execute $ /usr/bin/ssh-add -- Provide pass phrase at this command.
3. Log in as root and do the step 1 -- Provide pass phrase WHEN prompted
4. Log in as the oracle user oradb2
execute $ exec /usr/bin/shh-agent $SHELL
. execute $ /usr/bin/ssh-add -- Provide pass phrase at this command.
5. Log in as root and do the steps 2 and 3 -- Provide pass phrase WHEN prompted
6. Execute
On oradb1 -> $ ssh oradb2 date -- This should not ask for password
On oradb2 -> $ ssh oradb1 date -- This should not ask you password.
7. On Oradb1 enter the following commands to start Oracle Universal Installer, where patchset_directory is the directory where we have unzipped the patch set software in Step A.2
$ cd patchset_directory/Disk1
$ ./runInstaller
8. Run /usr/sbin/slibclean when prompted. – Run this as a root.
9. On the Welcome screen, click next.
10. In the Specify Home Details screen, select the name of the Oracle Home need to update, then click Next
11. Click Next when the Selected nodes screen appears.
12. On the Summary screen, click Install.
This screen lists all of the patches available for installation
13. When prompted, run the $ORACLE_HOME/root.sh script as the root user. Since we are applying the patch set to an Oracle RAC installation, we will run the root.sh script on each node of the cluster
14. At the End of Installation screen, click Exit, then click Yes to exit from Oracle Universal Installer
D. Troubleshooting Steps -
After applying patch to RDBMS Home, the CRSD daemon was not coming up on node-1, because of which all nodeapps and database were down.
It happened because we ran into bug 5384061 and the OCR had inconsistent entries as a result of this bug.
We followed below steps to restore OCR from the backup taken before inconsistency took place in OCR
On Oradb2 the crsd.bin was being cored, when the core files were removed ($CRS_HOME/log/), we were able to bring up CRS but it was continuously coredumping.
1. We tried to shutdown CRS with crsctl stop crs, but failed, because CRSD was not communicating. So we disabled CRSD with command –
#etc/init.crs disable (On both the nodes)
#crsctl stop crs (On oradb2)
Still we were unable to stop CRS on Oradb1 so we rebooted it.
2. At this stage CRSD, EVMD and CSSD were down on both nodes.
3. We took export of OCR (from Oradb1) using following command.
Ocrconfig –export backup09092007.ocr –s online
4. Then we took import of the same file using following command. (on Oradb1)
Ocrconfig –import backup09092007.ocr –s online
5. We enabled CRS and then started it
6. Then we enabled CRS and started it on both the nodes.
# crsctl enable crs -- oradb1
# crsctl enable crs -- oradb2
# crsctl start crs --oradb1
# crsctl start crs -- oradb2
7. At this point crs_stat –t output showed online for all nodeapps and CRSD, CSSD, EVMD status was healthy.
E. Upgrading Database from 10.2.0.2 to 10.2.0.3
1. Start listener on both nodes using following commands.
$ srvctl start listener –n oradb1
$ srvctl start listener –n oradb2
2. Start database in nomount stage and make cluster database parameter false
Startup nomount
Sql>Alter system set cluster_database=false;
Sql>alter system set log_archive_dest_state_2=defer;
3. Then shutdown and startup the database in upgrade mode.
Shutdown immediate
Enter following cpmmands
SQL> STARTUP UPGRADE
SQL> SPOOL home/oracle/patch.log
SQL> @?/rdbms/admin/catupgrd.sql
SQL> SPOOL OFF
4. Shutdown and startup database, run utlrp.sql script to compile the invalid objects.
5. Take coldbackup of the database and archivelogs using RMAN.
6. Make cluster database parameter ‘true’ and shutdown and start both the nodes.
F. Steps to apply patch on Physical Standby Database
1. Cancel media recovery process on standby and shut it down.
2. Shut down all processes in the Oracle home on each node that might be accessing a database, for example Oracle Enterprise Manager Database Control or iSQL*Plus:.
$ emctl stop dbconsole
$ emctl stop agent
$ isqlplusctl stop
3. On Oradbdr enter the following commands to start Oracle Universal Installer, where patchset_directory is the directory where we have unzipped the patch set software in Step A.2
$ cd patchset_directory/Disk1
$ ./runInstaller
4. Run /usr/sbin/slibclean when prompted. – Run this as a root.
5. On the Welcome screen, click next.
6. In the Specify Home Details screen, select the name of the Oracle Home need to update, then click Next
7. Click Next when the Selected nodes screen appears.
8. On the Summary screen, click Install.
This screen lists all of the patches available for installation
9. When prompted, run the $ORACLE_HOME/root.sh script as the root user.
10. At the End of Installation screen, click Exit, then click Yes to exit from Oracle Universal Installer
G. Creating Standby Database
1. Take backup of current controlfile on primary for standby
Rman> backup current controlfile for standby format ‘/home/oracle/standby_%p’
-- do this step on oradb1
2. Copy all the backup pieces generated in Step E-5 and G-1 to standby database.
3. Startup database in Nomount stage
4. Restore standby controlfile using rman
$ Rman target /
Rman> restore standby controlfile from ‘/home/oracle/standby_1215466’;
Rman> alter database mount;
Rman> catalog backuppiece ‘path of the backuppiece’ -- copied in step 2
Rman> restore archivelog all;
Rman> recover standby database;
5. Start managed recovery process on standby.
Sql> alter database recover managed standby database disconnect from session;
6. On primary database enable the log_archive_dest_state_2 parameter
Sql> alter system set log_archive_dest_state_2=enable -- do this step on oradb1