Documente Academic
Documente Profesional
Documente Cultură
1/1
The Environment
The environment consisted of 2 nodes running Red Hat Linux Version 4, Oracle clusterware and database version 10.2.0.3 [oracle@rac1 ~]$ uname -a Linux rac1.av.com 2.6.9-55.0.0.0.2.EL #1 Wed May 2 14:55:28 PDT 2007 i686 i686 i386 GNU/Linux [oracle@rac1 ~]$ cat /etc/issue Enterprise Linux Enterprise Linux AS release 4 (October Update 5) Kernel \r on an \m [oracle@rac1 ~]$ chkcrs HA Resource ----------ora.rac1.ASM1.asm ora.rac1.ASM1.asm ora.rac1.LISTENER_RAC1.lsnr ora.rac1.gsd
on on on on
2/31
[oracle@rac1 bin]$ crsctl query crs softwareversion CRS software version on node [rac1] is [10.2.0.3.0] [oracle@rac1 bin]$ crsctl query crs activeversion CRS active version on the cluster is [10.2.0.3.0] SQL> select * from v$version; BANNER ---------------------------------------------------------------Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod PL/SQL Release 10.2.0.3.0 - Production
3/31
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production With the Partitioning, Real Application Clusters, OLAP and Data Mining options SQL> set pages 50000 lines 120 SQL> spool chk.log SQL> @utlu111i.sql
4/31
5/31
6/31
7/31
Being at the patch root directory execute the opatch apply command:
8/31
Oracle Home : /u01/app/oracle/product/10.2.0/db_1 Central Inventory : /u01/app/oracle/oraInventory from : /etc/oraInst.loc OPatch version : 10.2.0.3.0 OUI version : 10.2.0.3.0 OUI location : /u01/app/oracle/product/10.2.0/db_1/oui Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2008-1215_17-28-13PM.log ApplySession applying interim patch '5746875' to OH '/u01/app/oracle/product/10.2.0/db_1' OPatch detected the node list and the local node from the inventory. the local system then propagate the patch to the remote nodes. OPatch will patch
Backing up files and inventory (not for auto-rollback) for the Oracle Home Backing up files affected by the patch '5746875' for restore. This might take a while... Backing up files affected by the patch '5746875' for rollback. This might take a while... Patching component oracle.oracore.rsf, 10.2.0.3.0... Copying file to "/u01/app/oracle/product/10.2.0/db_1/oracore/zoneinfo/timezdif.csv" Copying file to "/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/utltzuv2.sql" ApplySession adding interim patch '5746875' to inventory Verifying the update...
9/31
10/31
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production With the Partitioning, Real Application Clusters, OLAP and Data Mining options SQL> @utltzuv2.sql DROP TABLE sys.sys_tzuv2_temptab * ERROR at line 1: ORA-00942: table or view does not exist
Table created.
11/31
12/31
Oracle Home Central Inventory from OPatch version OUI version OUI location Log file location 15_23-05-22PM.log
: : : : : : :
13/31
Interim patches (3) : Patch 5746875 : applied on Mon Dec 15 17:28:24 IST 2008 Created on 28 Feb 2007, 07:19:02 hrs US/Eastern Bugs fixed: 5126270, 5726033, 5746875 Patch 5556081 : applied on Wed Jun 20 23:05:13 IDT 2007 Created on 9 Nov 2006, 22:20:50 hrs PST8PDT Bugs fixed: 5556081 Patch 5557962 : applied on Wed Jun 20 23:04:27 IDT 2007 Created on 9 Nov 2006, 23:23:06 hrs PST8PDT Bugs fixed: 4269423, 5557962, 5528974
Rac system comprising of multiple nodes Local node = rac1 Remote node = rac2 --------------------------------------------------------------------------------
14/31
Oracle Home Central Inventory from OPatch version OUI version OUI location Log file location 15_23-05-41PM.log
: : : : : : :
ApplySession applying interim patch '5632264' to OH '/u01/app/oracle/product/10.2.0/db_1' OPatch detected the node list and the local node from the inventory. the local system then propagate the patch to the remote nodes. OPatch will patch
This node is part of an Oracle Real Application Cluster. Remote nodes: 'rac2' Local node: 'rac1' Please shut down Oracle instances running out of this ORACLE_HOME on all the nodes. (Oracle Home = '/u01/app/oracle/product/10.2.0/db_1') Are all the nodes ready for patching? Do you want to proceed? [y|n]
15/31
16/31
OPatch succeeded.
Once the path is installed we need to re-check with the utlu111i.sql script
Rexecute the checkup script SQL> !ls chk.log utlu111i.sql SQL> spool chk2.log SQL> @utlu111i.sql Oracle Database 11.1 Pre-Upgrade Information Tool .
12-15-2008 23:12:23
17/31
18/31
19/31
The remaining warnings will not affect the automatic upgrade using DBUA so I can continue
20/31
21/31
22/31
23/31
24/31
25/31
26/31
With this screen the upgrade process completed, the following message was displayed on screen: DBUA failed to upgrade the database or some of its components. See /u01/app/orac le/cfgtoollogs/dbua/sati/upgrade5 for more details.The following document describes important behavioral changes from previous database releases: /u01/app/oracle/product/11.1.0/db_1/assistants/dbua/doc/DefaultBehaviorChanges.html The failure mentioned was related to the Enterprise manager repository, that Ill need to do manually using emca. Chech Version from Sqlplus [oracle@rac1 db_1]$ sqlplus / as sysdba
27/31
Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> show sga Total System Global Area Fixed Size Variable Size Database Buffers Redo Buffers Check Cluster Resources Status [oracle@rac1 db_1]$ chkcrs HA Resource ----------ora.rac1.ASM1.asm ora.rac1.LISTENER_RAC1.lsnr ora.rac1.gsd ora.rac1.ons ora.rac1.vip ora.rac2.ASM2.asm ora.rac2.LISTENER_RAC2.lsnr ora.rac2.gsd Target -----ONLINE ONLINE ONLINE ONLINE ONLINE ONLINE ONLINE ONLINE State ----ONLINE ONLINE ONLINE ONLINE ONLINE ONLINE ONLINE ONLINE 351522816 1313344 188745152 155189248 6275072 bytes bytes bytes bytes bytes
on on on on on on on on
28/31
29/31
ANNEXES
Chkcrs script
--------------- script start on next line -------------------#!/usr/bin/ksh # # Sample 10g CRS resource status query script # # Description: # # # - Returns formatted version of crs_stat -t, in tabular format, with the complete rsc names and filtering keywords - The argument, $RSC_KEY, is optional and if passed to the script, will
30/31
# Table header:echo "" $AWK \ 'BEGIN {printf "%-45s %-10s %-18s\n", "HA Resource", "Target", "State"; printf "%-45s %-10s %-18s\n", "-----------", "------", "-----";}'
# Table body: $ORA_CRS_HOME/bin/crs_stat $QSTAT | $AWK \ 'BEGIN { FS="="; state = 0; } $1~/NAME/ && $2~/'$RSC_KEY'/ {appname = $2; state=1}; state == 0 {next;} $1~/TARGET/ && state == 1 {apptarget = $2; state=2;} $1~/STATE/ && state == 2 {appstate = $2; state=3;} state == 3 {printf "%-45s %-10s %-18s\n", appname, apptarget, appstate; state=0;}'
31/31