oracle patch on 10.2.0.4 on 2 node rac[1]

16
Upgrading Oracle Database 10 g Release 10.2.0. x to Oracle Database 10 g Release 10.2.0.4 Reference: 1) Oracle Patch Set Notes Please follow this Document Oracle® Database Patch Set Notes 10g Release 2 (10.2.0.4) Patch Set 3 for Linux x86 2) Vincent Chan ([email protected]) is a Senior Consultant at MSD Inc. He is an Oracle Certified Master DBA with more than ten years of experience architecting and implementing Oracle solutions for various clients. http://www.oracle.com/technology/tech/linux/install/index.html Doubts, Comments and suggestions: Please feel free to contact me @ [email protected] Versions Used: Oracle Clusterware: 10.2.0.1 Oracle Database 10g: 10.2.0.1 Operating System: Oracle Enterprise Linux 4.0 VM Ware: 1.06 ** This specific patch is for Oracle Binaries but not for the Clusterware, which I will update soon. 7.7.3 Stopping All Processes for an Oracle RAC Installation Shut down the following Oracle Database 10g processes before installing the patch set: 1. 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: 2. $ emctl stop dbconsole 3. $ isqlplusctl stop HOST – 1

Upload: nawabsharief

Post on 20-Jul-2016

42 views

Category:

Documents


1 download

DESCRIPTION

.

TRANSCRIPT

Page 1: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

Upgrading Oracle Database 10g Release 10.2.0.x to Oracle Database 10g Release 10.2.0.4 Reference: 1) Oracle Patch Set Notes Please follow this Document Oracle® Database Patch Set Notes 10g Release 2 (10.2.0.4) Patch Set 3 for Linux x86

2) Vincent Chan ([email protected]) is a Senior Consultant at MSD Inc. He is an Oracle Certified Master DBA with more than ten years of experience architecting and implementing Oracle solutions for various clients. http://www.oracle.com/technology/tech/linux/install/index.html Doubts, Comments and suggestions: Please feel free to contact me @ [email protected] Versions Used: Oracle Clusterware: 10.2.0.1 Oracle Database 10g: 10.2.0.1 Operating System: Oracle Enterprise Linux 4.0 VM Ware: 1.06 ** This specific patch is for Oracle Binaries but not for the Clusterware, which I will update soon. 7.7.3 Stopping All Processes for an Oracle RAC Installation

Shut down the following Oracle Database 10g processes before installing the patch set:

1. 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:

2. $ emctl stop dbconsole 3. $ isqlplusctl stop

HOST – 1

Page 2: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

HOST – 2

login as: oracle [email protected]'s password: Last login: Thu Jul 10 12:31:29 2008 rac1-> hostname rac1.mycorpdomain.com rac1-> emctl stop dbconsole TZ set to US/Eastern Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. http://rac1.mycorpdomain.com:1158/em/console/aboutApplication Stopping Oracle Enterprise Manager 10g Database Control ... ... Stopped. rac1-> isqlplusctl stop iSQL*Plus 10.2.0.1.0 Copyright (c) 2003, 2005, Oracle. All rights reserved. iSQL*Plus instance on port 5560 is not running ...

1. Shut down all services in the Oracle home on each node that might be accessing a database:

$ srvctl stop service -d db_name [-s service_name_list [-i inst_name]]

rac1-> crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora.devdb.db application ONLINE ONLINE rac1 ora....b1.inst application ONLINE ONLINE rac1 ora....b2.inst application ONLINE ONLINE rac2 ora....SM1.asm application ONLINE ONLINE rac1 ora....C1.lsnr application ONLINE ONLINE rac1 ora.rac1.gsd application ONLINE ONLINE rac1 ora.rac1.ons application ONLINE ONLINE rac1

Page 3: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

ora.rac1.vip application ONLINE ONLINE rac1 ora....SM2.asm application ONLINE ONLINE rac2 ora....C2.lsnr application ONLINE ONLINE rac2 ora.rac2.gsd application ONLINE ONLINE rac2 ora.rac2.ons application ONLINE ONLINE rac2 ora.rac2.vip application ONLINE ONLINE rac2 *** No Services running as I did not configure any – skipping this step.

1. Shut down all Oracle RAC instances on the nodes, which run from the Oracle home on which you are going to apply the patch set. To shut down all Oracle RAC instances for a database, enter the following command where db_name is the name of the database:

$ srvctl stop database -d db_name rac1-> hostname rac1.mycorpdomain.com ra c1->

rac1-> srvctl stop database -d devdb rac1-> ps -ef|grep devdb oracle 5735 1452 0 16:24 pts/4 00:00:00 grep devdb rac1-> crs_stat -t Name Type Target State Host ----------------------------------------------------------- ora.devdb.db application OFFLINE OFFLINE ora....b1.inst application OFFLINE OFFLINE ora....b2.inst application OFFLINE OFFLINE ora....SM1.asm application ONLINE ONLINE rac1 ora....C1.lsnr application ONLINE ONLINE rac1 ora.rac1.gsd application ONLINE ONLINE rac1 ora.rac1.ons application ONLINE ONLINE rac1 ora.rac1.vip application ONLINE ONLINE rac1 ora....SM2.asm application ONLINE ONLINE rac2 ora....C2.lsnr application ONLINE ONLINE rac2 ora.rac2.gsd application ONLINE ONLINE rac2 ora.rac2.ons application ONLINE ONLINE rac2 ora.rac2.vip application ONLINE ONLINE rac2

Page 4: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

2. If Automatic Storage Management instance is present, then shut down all Automatic Storage Management instances on all nodes. To shut down an Automatic Storage Management instance, enter the following command where node is the name of the node where the Automatic Storage Management instance is running:

$ srvctl stop asm -n node ** Make sure that we stop on each node.

Page 5: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

This needs to be done only when patching the home from where ASM runs. It is recommended that ASM run from a different ORACLE_HOME than the database.

3. Stop any listeners that are running from the Oracle home that you are patching on all nodes. To stop the listener running on a node, enter the following command, where node is the name of the node where the listener is running:

$ srvctl stop listener -n node [-l listenername] rac1-> srvctl stop listener -n rac1 -l LISTENER_RAC1

7.8 Back Up the System

Oracle recommends that you create a backup of the Oracle Inventory, Oracle 10g home and Oracle 10g Database before you install the patch set. If you are planning to apply this patch to

Page 6: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

Oracle RAC, ensure that you create a backup of these components on all nodes before applying the patch

I did not – as have a backup of whole VM Pool. 8 Installation Tasks

8.1 Installing the Oracle Database 10g Patch Set Interactively

To install the Oracle Database 10g patch set interactively:

1. Log in as the oracle user. (Please note that I am doing it from the Server Console, so no – X-Windows software).

1. Enter the following commands to start Oracle Universal Installer, where patchset_directory is the directory where you unpacked the patch set software:

% cd patchset_directory/Disk1 % ./runInstaller

Page 7: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

2. On the Welcome screen, click Next. 3. On the Specify Home Details screen, select the name of the Oracle home that you want

to update, or select the Path that you want to update from the list, then click Next.

Page 8: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

4. If you are installing the patch set on an Oracle RAC cluster, click Next when the Selected Nodes screen appears.

5. On the Product-specific Prerequisite Checks screen, correct any reported errors, and click Next.

Page 9: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

6. Enter details regarding the CSI Number, OracleMetaLink Account user name and Country code on the Oracle Configuration Manager Registration screen and click Next.

Page 10: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

Note: The registration and configuration can also be done manually after patchset installation.

The OCM registration page appears only while applying 10.2.0.4 patch over existing DB instances alone. (☺ New Feature of Oracle 10.2.0.4)

7. On the Summary screen, click Install.

This screen lists all of the patches available for installation.

8. When prompted, run the $ORACLE_HOME/root.sh script as the root user. If you are applying the patch set to an Oracle RAC installation, then run the root.sh script on each node of the cluster.

Page 11: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

Note: If you are applying this patch set to an Oracle Clusterware installation, then complete all of the steps displayed on the Oracle Universal Installer screen.

The Oracle Clusterware installation instructions displayed on the Oracle Universal Installer screen are also available in the CRS_home/install/readme.txt file.

o When applying this patch set on an Oracle Clusterware home, Oracle Universal Installer prompts you to run the root102.sh script from $ORACLE_HOME/install. You must run this script as the root user on all nodes.

o Before you add a new node, ensure that you run rootpre.sh script as the root user on the new node.

Page 12: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

9. On the End of Installation screen, click Exit, then click Yes to exit from Oracle Universal Installer.

[root@rac1 ~]# /u01/app/oracle/product/10.2.0/db_1/root.sh Running Oracle10 root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/10.2.0/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying dbhome to /usr/local/bin ... The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying oraenv to /usr/local/bin ... The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying coraenv to /usr/local/bin ... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed.

[root@rac2 ~]# /u01/app/oracle/product/10.2.0/db_1/root.sh

Page 13: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

Running Oracle10 root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/10.2.0/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying dbhome to /usr/local/bin ... The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying oraenv to /usr/local/bin ... The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying coraenv to /usr/local/bin ... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed.

9.3.2.2 Upgrading a Release 10.2 Database

After you install the patch set, you must perform the following steps on every database associated with the upgraded Oracle home:

Note: If you do not run the catupgrd.sql script as described in this section and you start up a database for normal operation, then ORA-01092: ORACLE

Page 14: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

instance terminated. Disconnection forced errors will occur and the error ORA-39700: database must be opened with UPGRADE option will be in the alert log.

1. Log in as the Oracle software owner user. 2. For Oracle RAC installations, start listener on each node of the cluster as follows: 3. $ srvctl start listener -n node 4. If you are using Automatic Storage Management, start the Automatic Storage

Management instance. 5. For single-instance installations, start the listener as follows: 6. $ lsnrctl start 7. For single-instance installations, use SQL*Plus to log in to the database as the SYS user

with SYSDBA privileges: 8. $ sqlplus /nolog 9. SQL> CONNECT SYS AS SYSDBA 10. Enter password:SYS_password 11. For Oracle RAC installations:

a. Use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges: b. $ sqlplus /nolog c. SQL> CONNECT SYS AS SYSDBA d. Enter password: SYS_password e. SQL> STARTUP NOMOUNT f. Set the CLUSTER_DATABASE initialization parameter to FALSE: g. SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE

SCOPE=spfile; h. Shut down the database: i. SQL> SHUTDOWN

12. Enter the following SQL*Plus commands: 13. SQL> STARTUP UPGRADE 14. SQL> SPOOL patch.log 15. SQL> @?/rdbms/admin/catupgrd.sql 16. SQL> SPOOL OFF

Refer Below screen upon completion: Oracle Database 10.2 Upgrade Status Utility 07-10-2008 19:22:56 . Component Status Version HH:MM:SS Oracle Database Server VALID 10.2.0.4.0 00:19:00 JServer JAVA Virtual Machine VALID 10.2.0.4.0 00:12:34 Oracle XDK VALID 10.2.0.4.0 00:02:09 Oracle Database Java Packages VALID 10.2.0.4.0 00:01:10 Oracle Text VALID 10.2.0.4.0 00:00:58 Oracle XML Database VALID 10.2.0.4.0 00:03:29 Oracle Real Application Clusters VALID 10.2.0.4.0 00:00:03 Oracle Workspace Manager VALID 10.2.0.4.3 00:01:37 Oracle Data Mining VALID 10.2.0.4.0 00:00:48 OLAP Analytic Workspace VALID 10.2.0.4.0 00:01:18 OLAP Catalog VALID 10.2.0.4.0 00:01:58 Oracle OLAP API VALID 10.2.0.4.0 00:01:54 Oracle interMedia VALID 10.2.0.4.0 00:08:48 Spatial VALID 10.2.0.4.0 00:05:33 Oracle Expression Filter VALID 10.2.0.4.0 00:00:32 Oracle Enterprise Manager VALID 10.2.0.4.0 00:03:31 Oracle Rule Manager VALID 10.2.0.4.0 00:00:26

Page 15: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

1. Review the patch.log file for errors and inspect the list of components that is displayed at the end of catupgrd.sql script.

This list provides the version and status of each SERVER component in the database.

2. If necessary, rerun the catupgrd.sql script after correcting any problems. 3. Restart the database: 4. SQL> SHUTDOWN IMMEDIATE 5. SQL> STARTUP 6. Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when

the packages are accessed for the first time. This step is optional but recommended. 7. SQL> @?/rdbms/admin/utlrp.sql

TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_END 2008-07-10 19:56:26 DOC> The following query reports the number of objects that have compiled DOC> with errors (objects that compile with errors have status set to 3 in

Page 16: Oracle Patch on 10.2.0.4 on 2 Node RAC[1]

DOC> obj$). If the number is higher than expected, please examine the error DOC> messages reported with each object (using SHOW ERRORS) to see if they DOC> point to system misconfiguration or resource constraints that must be DOC> fixed before attempting to recompile these objects. DOC># OBJECTS WITH ERRORS ------------------- 0 DOC> The following query reports the number of errors caught during DOC> recompilation. If this number is non-zero, please query the error DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors DOC> are due to misconfiguration or resource constraints that must be DOC> fixed before objects can compile successfully. DOC># ERRORS DURING RECOMPILATION --------------------------- 0 SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile; SQL> shutdown Database closed. Database dismounted. ORACLE instance shut down.

Happy Endings ☺ Take a full backup – Reboot the nodes, if you want! And Close the Change. Cheers Ravi Prakash