Upgrading to Oracle RAC 11g on Oracle Enterprise Linux

Learn how to upgrade Oracle RAC 10g Release 2 to Oracle RAC 11g on Oracle Enterprise Linux 5, step by step. By Vincent Chan Published October 2007 Oracle has recently released its much-anticipated Oracle Database 11g, the next generation of grid computing. This release brings a significant advancement in grid computing, packed with incredible new features that further improve database availability and manageability, performance monitoring, diagnostics, and the database upgrade procedure. Key features such as Oracle Real Application Testing, Physical Standby with Real Time Query, new partitioning schemes, and Result Cache are some of the few impressive innovations. There are basically three approaches to upgrade Oracle RAC 10g to Oracle RAC 11g:
• • •

Using Oracle Database Upgrade Assistant (DBUA) utility Manual upgrade Exporting the Oracle 10g database and importing into Oracle 11g database

The recommended approach is to use DBUA to upgrade your database and Automatic Storage Management (ASM). DBUA performs a lot of the manual tasks, which significantly simplifies the upgrade process. In this guide, we will describe the upgrade procedure using DBUA. Downloads for this guide:
• •

Oracle Clusterware Release 1 (11.1.0.6.0) for Linux x86 Oracle Database 11g Release 1 (11.1.0.6.0) for Linux x86

Overview
This guide is structured into the following steps: 1. 2. 3. 4. 5. 6. Preliminary Installation Upgrade Oracle Clusterware Install Oracle Database 11g Release 1 software Upgrade Oracle Database Upgrade Oracle ASM Explore Oracle Database 11g

An overview of our Oracle RAC 10g environment: Host Name merlin1 merlin2 Instance Name devdb1 devdb2 Database Name devdb devdb Clusterware File Storage Raw Raw Database File Storage ASM ASM

Host Name

Oracle Clusterware Home

Oracle ASM Home

Oracle Home

merlin1 /u02/crs/oracle /u01/app/oracle/product/10.2.0/db_1 /u01/app/oracle/product/10.2.0/db_1 merlin2 /u02/crs/oracle /u01/app/oracle/product/10.2.0/db_1 /u01/app/oracle/product/10.2.0/db_1

Oracle Clusterware Files Oracle Cluster Registry Voting Disk

Device Name /dev/sdb1 /dev/sdc1

And an overview of the Oracle RAC 11g environment: Host Name merlin1 merlin2 Instance Name devdb1 devdb2 Database Name devdb devdb Clusterware File Storage Raw Raw Database File Storage ASM ASM

Host Name

Oracle Clusterware Home

Oracle ASM Home

Oracle Home

merlin1 /u02/crs/oracle /u01/app/oracle/product/11.1.0/asm /u01/app/oracle/product/11.1.0/db_1 merlin2 /u02/crs/oracle /u01/app/oracle/product/11.1.0/asm /u01/app/oracle/product/11.1.0/db_1

Oracle Clusterware Files

Device Name

e15.e15. compat-libstdc++-33-3.5-12.11-7. Install additional software packages Install the following packages as the root user if they are not already installed on the RAC nodes.rpm unixODBC-2.rpm 2.rpm 8.3.1.rpm unixODBC-devel-2.e15. configure the appropriate parameters in /etc/sysctl. Oracle ASM Home and Oracle Home on each node for redundancy and higher availability.e15.rpm 7.shmall kernel.1-52.Oracle Cluster Registry Voting Disk /dev/sdb1 /dev/sdc1 You'll install the software in the Oracle Clusterware Home. sysstat-7.i386.2.rpm 9.rpm libaio-devel-0.rpm 10.iso.1. gcc-c++-4.0.2. If necessary. unixODBC-2.1.0-3.rpm 5.i386. libstdc++-devel-4.i386.125-3.11-7.125-3.shmmax = 2097152 = 2147483648 .2.1. kernel.2.e15.i386.rpm 4. gcc-4.rpm 3.i386. elfutils-libelf-devel-0.11-7.106-3.2.i386.i386. 1.i386. These packages can be extracted from Enterprise-R5-GA-Server-i386disc2.1.i386.i386.106-3.iso and Enterprise-R5-GA-Server-i386-disc3.3. unixODBC-devel-2.3-61.i386.1-52.i386.i386.2. # ls -1 elfutils-libelf-devel-0. Preliminary Installation Perform a full backup Backup your Oracle RAC 10g environment before upgrading to Oracle RAC 11g.11-7.rpm 6.e15.rpm After extracting the packages execute the command below as the root user. 1.1-52.1.2.i386. libaio-devel-0. glibc-devel-2.rpm # # rpm -Uvh *.conf on both nodes.1.rpm Verify kernel parameters The minimum kernel parameters requirements are listed below.

ip_local_port_range net.1 or information on Oracle 10.wmem_default net.log Verify all pre-requisites are met.sh.1.2.3 patchset (5337014) can be downloaded from Oracle Metalink.rmem_default net. the Oracle Clusterware must be at least version 10.ipv4.6 software from OTN to a temporary directory and execute runcluvfy.2. Refer to Oracle Metalink Note 419058.0.3 Prior to upgrading to Oracle RAC 11g.3-3.RHEL3.2.core.0.core. Upgrade Oracle Clusterware Upgrade Oracle Clusterware to version 10. Download and uncompress the Oracle Clusterware 11.0.core.2. The tool scans all the required components in the cluster environment to ensure all criteria are met for a successful installation. You can ignore the "Package existence checked failed" for openmotif-2.kernel.sem fs. merlin1-> srvctl stop database -d devdb merlin1-> srvctl stop asm -n merlin1 merlin1-> srvctl stop asm -n merlin2 merlin1-> srvctl stop nodeapps -n merlin1 merlin1-> srvctl stop nodeapps -n merlin2 merlin1-> crs_stat -t Name Type Target State Host -----------------------------------------------------------ora. Stop all database resources.db application OFFLINE OFFLINE .devdb. The 10.wmem_max = = = = = = = = 4096 250 32000 100 128 65536 1024 65000 4194304 4194304 262144 262144 2.sh stage -pre crsinst -n all -verbose > /tmp/prechecks.0.shmmni kernel.3 or 10.0] Oracle Clusterware pre-installation checks Cluster Verification Utility (CVU) reduces the complexity and time it takes to install RAC.file-max net.2. merlin1-> crsctl query crs activeversion CRS active version on the cluster is [10.0.2 with CRS Bundle Patch #2 (reference Bug 5256865) if you would like to do a rolling upgrade.2.0.core.3 patch set for Linux x86. /stage/clusterware/runcluvfy.3.rmem_max net.0.2.

As the oracle user on merlin1.in1.N1. # cd /stage/clusterware/upgrade # .. Execute Configuration scripts: Execute the scripts below as the root user sequentially.SM2. This could take several minutes.. .. Summary: Click on Install.. one at a time. The script stops the Oracle Clusterware stack and changes the permission of files in the Oracle Clusterware Home directory. The OUI will automatically install the existing binary software on each node. Welcome: Click on Next.ons ora.b2. Stopping CSSD...vip ora..gsd ora. 2.. Oracle CRS stack is down now...vip application application application application application application application application application application application application OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE Prepare the Oracle Clusterware Home for upgrade Execute the preupdate.....gsd ora. Do not proceed to the next script until the current script completes.ora..lsnr ora.. merlin1-> /stage/clusterware/runInstaller 1..inst ora.lsnr ora.in1.... Successfully stopped CRS resources.. Upgrade the Oracle Clusterware You are only required to run the Oracle Universal Installer (OUI) on one node.N2. Specify Home Details: Verify the correct CRS_Home directory (/u02/crs/oracle) is displayed.asm ora... Product-Specific Prerequisite Checks: Verify overall result is successful. Shutting down CSS daemon... Shutdown has begun.asm ora.. Shutdown request successfully issued.. Checking to see if Oracle CRS stack is down. Specify Hardware Cluster Installation Mode: Verify all nodes are selected. 4. 5... The daemons should exit soon.ons ora. 6....in2..in2..sh -crshome /u02/crs/oracle -crsuser oracle Shutting down Oracle Cluster Ready Services (CRS): Stopping resources..inst ora.. As the root user on each node.b1./preupdate.SM1..sh script on each node to prepare the clusterware home for upgrade.in2..in1. 3.

6. privgrp 'root'. Operation successful. copying ONS config file to 11. Execute /u02/crs/oracle/install/rootupgrade on merlin1.. is successfully upgraded to 11. Execute /u02/crs/oracle/install/rootupgrade on merlin2.0 Checking the existence of nodeapps on this node Creating '/u02/crs/oracle/install/paramfile... # /u02/crs/oracle/install/rootupgrade Checking to see if Oracle CRS stack is already up.config WARNING: directory '/u02/crs' is not owned by root WARNING: directory '/u02' is not owned by root Oracle Cluster Registry configuration upgraded successfully Adding daemons to inittab Attempting to start Oracle Clusterware stack Waiting for Cluster Synchronization Services daemon to start Cluster Synchronization Services daemon has started Waiting for Event Manager daemon to start Event Manager daemon has started Cluster Ready Services daemon has started Oracle CRS stack is running under init(1M) clscfg: EXISTING configuration version 3 detected.1 CRS home /bin/cp: `/u02/crs/oracle/opmn/conf/ons.0.crs' with data used for CRS configuration Setting CRS configuration values in /u02/crs/oracle/install/paramfile.config was copied successfully to /u02/crs/oracle/opmn/conf/ons. node <nodenumber>: <nodename> <private interconnect name> <hostname> node 1: merlin1 merlin1-priv merlin1 Creating OCR keys for user 'root'.config' are the same file /u02/crs/oracle/opmn/conf/ons.config' are the same file /u02/crs/oracle/opmn/conf/ons. Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.config WARNING: directory '/u02/crs' is not owned by root WARNING: directory '/u02' is not owned by root Oracle Cluster Registry configuration upgraded successfully Adding daemons to inittab . # /u02/crs/oracle/install/rootupgrade Checking to see if Oracle CRS stack is already up. copying ONS config file to 11. clscfg -upgrade completed successfully CRS stack on this node. On merlin1..crs On merlin2.config' and `/u02/crs/oracle/opmn/conf/ons.a. clscfg: version 3 is 10g Release 2.1 CRS home /bin/cp: `/u02/crs/oracle/opmn/conf/ons. b. Successfully accumulated necessary OCR keys.1.config was copied successfully to /u02/crs/oracle/opmn/conf/ons..config' and `/u02/crs/oracle/opmn/conf/ons.

privgrp 'root'.1..0. node <nodenumber>: <nodename> <private interconnect name> <hostname> node 2: merlin2 merlin2-priv merlin2 Creating OCR keys for user 'root'. Operation successful.6. If the CVU fails.6.1.6.0 Checking the existence of nodeapps on this node Creating '/u02/crs/oracle/install/paramfile.1.0] 7.0] merlin1-> $ORA_CRS_HOME/bin/crsctl query crs activeversion Oracle Clusterware active version on the cluster is [11. is successfully upgraded to 11.. The OUI does a Clusterware post-installation check at the end.0. .0. Return to the Execute Configuration scripts screen on merlin1 and click on "OK.crs merlin1-> $ORA_CRS_HOME/bin/crsctl check crs Cluster Synchronization Services appears healthy Cluster Ready Services appears healthy Event Manager appears healthy merlin1-> $ORA_CRS_HOME/bin/crsctl query crs softwareversion Oracle Clusterware version on node [merlin1] is [11.6.0] merlin2-> $ORA_CRS_HOME/bin/crsctl check crs Cluster Synchronization Services appears healthy Cluster Ready Services appears healthy Event Manager appears healthy merlin2-> $ORA_CRS_HOME/bin/crsctl query crs softwareversion Oracle Clusterware version on node [merlin2] is [11." 8. Configuration Assistants: Verify that all checks are successful.6.0] merlin2-> $ORA_CRS_HOME/bin/crsctl query crs activeversion Oracle Clusterware active version on the cluster is [11.merlin2 Performing post-checks for cluster services setup Checking node reachability. Successfully accumulated necessary OCR keys.1. clscfg: version 4 is 11 Release 1.Attempting to start Oracle Clusterware stack Waiting for Cluster Synchronization Services daemon to start Cluster Synchronization Services daemon has started Waiting for Event Manager daemon to start Waiting for Event Manager daemon to start Event Manager daemon has started Cluster Ready Services daemon has started Oracle CRS stack is running under init(1M) clscfg: EXISTING configuration version 4 detected.0.0. correct the problem and re-run the following command as the oracle user: merlin1-> /u02/crs/oracle/bin/cluvfy stage -post crsinst -n merlin1. Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.1..crs' with data used for CRS configuration Setting CRS configuration values in /u02/crs/oracle/install/paramfile. clscfg -upgrade completed successfully CRS stack on this node.

. All nodes free of non-clustered. Liveness check passed for "CRS daemon". Checking cluster integrity. Checking Cluster manager integrity. Checking daemon liveness..... Checking CRS integrity. Daemon status check passed for "CSS daemon". Checking daemon liveness... Liveness check passed for "CSS daemon"... Checking daemon liveness.Node reachability check passed from node "merlin1". local-only configurations.. User equivalence check passed for user "oracle". OCR of correct Version "2" exists. Checking CSS daemon..... Uniqueness check for OCR device passed.. Checking the absence of a non-clustered configuration.. OCR integrity check passed. Checking the version of OCR.... Cluster integrity check passed Checking OCR integrity.... Checking user equivalence. Data integrity check for OCR passed.. Checking CRS health.. Liveness check passed for "EVM daemon".. Cluster manager integrity check passed. Checking data integrity of OCR.. .

9.b2.in1.inst application ONLINE ONLINE merlin2 ora. merlin1-> $ORA_CRS_HOME/bin/crs_stat -t Name Type Target State Host -----------------------------------------------------------ora. End of Installation: Click Exit..inst application ONLINE ONLINE merlin1 ora.asm application ONLINE ONLINE merlin1 ora.SM1.....ons application ONLINE ONLINE merlin1 ora...lsnr application ONLINE ONLINE merlin1 ora.0/db_1 Install the Oracle Database software . Post-check for cluster services setup was successful.1...in2...in2. CRS integrity check passed.. At this stage.....vip application ONLINE ONLINE merlin1 ora.SM2..devdb.......b1. Checking node application existence.. the Oracle Clusterware has been upgraded to Oracle Clusterware 11g and all cluster resources should be running.asm application ONLINE ONLINE merlin2 ora..in1.ons application ONLINE ONLINE merlin2 ora.gsd application ONLINE ONLINE merlin1 ora.. Install Oracle Database 11g Release 1 Software Create the Oracle Home As the oracle user. Checking existence of VIP node application (required) Check passed.in1.CRS health check passed.N2..lsnr application ONLINE ONLINE merlin2 ora.... create the new Oracle home on both nodes.. Checking existence of GSD node application (optional) Check passed......db application ONLINE ONLINE merlin1 ora.in2.N1.gsd application ONLINE ONLINE merlin2 ora...vip application ONLINE ONLINE merlin2 3. Checking existence of ONS node application (optional) Check passed. mkdir -p /u01/app/oracle/product/11.

sql to verify that all pre-requisites are met. SQL> spool /tmp/utlu111i. c. 7. Execute /u01/app/oracle/product/11. Specify Home Details: a.1 Pre-Upgrade Information Tool 08-13-2007 18:03:45 . Oracle Base: /u01/app/oracle. Select Custom. 12. Database Administrator (OSDBA) Group: dba. 4. 3. 2.log SQL> @/u01/app/oracle/product/11. 6. Product-Specific Prerequisite Checks: Verify overall result is successful. Select Cluster Installation.Download the Oracle Database software from OTN.0/db_1/root. Create Database: a. 11. As part of the upgrade process.1. Select Installation Type: a. Re-execute the pre-database upgrade script after making the necessary modifications.0/db_1 4. End of Installation: Click on Exit. merlin1-> /stage/database/runInstaller 1.0/db_1/root. Name: OraDb11g_home1 c. Execute Configuration scripts: Execute the scripts below as the root user. Welcome: Click on Next. b. Path: /u01/app/oracle/product/11. Upgrade Oracle Database Pre-database upgrade checks Prior to running the Database Upgrade Assistant (DBUA). 10.sh on merlin2.sh on merlin1. b. . a. Specify Hardware Cluster Installation Mode: a. Summary: Click on Install. ASM administrator (OSASM) Group: dba. Database Operator (OSOPER) Group: oinstall. b. As the oracle user on merlin1. utlu111i. Execute /u01/app/oracle/product/11. 9. the DBUA changes the cluster_database parameter automatically from true to false.0/db_1/rdbms/admin/utlu111i Oracle Database 11. 8. execute the pre-database upgrade checks. 5. Click on Select All. Select Install database Software only. Available Product Components: Select all the required components. Return to the Execute Configuration scripts screen on merlin1 and click on OK. b.1.1. Connect as the sys user. Privileged Operating System Groups: a.1.

.. No changes are required.1 init..0 --> compatible: 10.0 --> blocksize: 8192 --> platform: Linux IA (32-bit) --> timezone file: V4 . ********************************************************************** Tablespaces: [make adjustments in the current environment] ********************************************************************** --> SYSTEM tablespace is adequate for the upgrade. ********************************************************************** Components: [The following database components will be upgraded or installed] ********************************************************************** --> Oracle Catalog Views [upgrade] VALID --> Oracle Packages and Types [upgrade] VALID --> JServer JAVA Virtual Machine [upgrade] VALID --> Oracle XDK for Java [upgrade] VALID --> Real Application Clusters [upgrade] VALID --> Oracle Workspace Manager [upgrade] VALID --> OLAP Analytic Workspace [upgrade] VALID --> OLAP Catalog [upgrade] VALID --> EM Repository [upgrade] VALID --> Oracle Text [upgrade] VALID --> Oracle XML Database [upgrade] VALID ..1 init.ora or spfile] ********************************************************************** -. ********************************************************************** Renamed Parameters: [Update Oracle Database 11... minimum required size: 315 MB --> SYSAUX tablespace is adequate for the upgrade. ********************************************************************** Obsolete/Deprecated Parameters: [Update Oracle Database 11. ********************************************************************** Update Parameters: [Update Oracle Database 11... .0.1 init.No update parameter changes are required.. . .. . minimum required size: 458 MB --> TEMP tablespace is adequate for the upgrade.. minimum required size: 61 MB --> EXAMPLE tablespace is adequate for the upgrade.2.********************************************************************** Database: ********************************************************************** --> name: DEVDB --> version: 10.No renamed parameters found...2.ora or spfile] ********************************************************************** --> "background_dump_dest" replaced by "diagnostic_dest" --> "user_dump_dest" replaced by "diagnostic_dest" --> "core_dump_dest" replaced by "diagnostic_dest" ..3.1.0.. .ora or spfile] ********************************************************************** -. minimum required size: 743 MB --> UNDOTBS1 tablespace is adequate for the upgrade. minimum required size: 66 MB . ..

. 11g Upgrade Guide for instructions to save the EM data prior to upgrade.1..profile export PS1="`/bin/hostname -s`-> " export EDITOR=vi export ORACLE_SID=devdb1 export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11...... SQL> spool off Modify the oracle user environment file Modify the ORACLE_HOME to reflect the new Oracle Database 11g directory on both nodes. Refer to the . statistics prior to upgrading the database. Direct downgrade of EM Database Control is not supported.... ********************************************************************** Miscellaneous Warnings ********************************************************************** WARNING: --> The "cluster_database" parameter is currently "TRUE" and must be set to "FALSE" prior to running the upgrade. .. .. Refer to the 11g Upgrade Guide for instructions to update ..... SYS WARNING: --> Database contains schemas with objects dependent on network packages... Component Schemas with stale statistics: .0/db_1 export ORA_CRS_HOME=/u02/crs/oracle export LD_LIBRARY_PATH=$ORACLE_HOME/lib export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/loca l/bin:/usr/X11R6/bin umask 022 Upgrade the database . ... ... PL/SQL procedure successfully completed. merlin1-> more . Refer to the 11g Upgrade Guide for instructions to configure Network ACLs. WARNING: --> EM Database Control Repository exists in the database. WARNING: --> Database contains stale optimizer statistics.--> Oracle Java Packages [upgrade] VALID --> Oracle interMedia [upgrade] VALID --> Spatial [upgrade] VALID --> Data Mining [upgrade] VALID --> Expression Filter [upgrade] VALID --> Rule Manager [upgrade] VALID --> Oracle OLAP API [upgrade] VALID .

/. Diagnostic Destination: a. Diagnostic Destination: /u01/app/oracle .As the oracle user. .profile merlin1-> which dbua /u01/app/oracle/product/11. Welcome: Click Next.1. Database Upgrade Assistant: Click Yes to migrate the existing listener. Database Upgrade Assistant: Click on No to upgrade ASM later. Figure 2 6. Figure 1 5. 4. merlin1-> . 3. execute dbua on merlin1. Databases: Select devdb. Oracle Base: /u01/app/oracle b. 2. Upgrade Operations: Select Upgrade a Database.0/db_1/bin/dbua merlin1-> dbua 1.

Flash Recovery Area Size: 2048 MB. Recovery Configuration: a. . Flash Recovery Area: +RECOVERYDEST. Recompile Invalid Objects: Select Recompile invalid objects at the end of upgrade. c. 8. b. 9. Summary: Click Finish.Figure 3 7. Select Specify Flash Recovery Area.

Figure 4 .

1.6.version.0.0.1.0 11.6.1.0 11.0.6.1.0.0 11.0 11.6.0 11.1.6.6.0.1.0.1.0.0 11.1.6.1.1.6.0 11.status from dba_registry.0.6.0 11.0. 11.0.6.6. Progress: Click OK to see the results of the upgrade. Upgrade Results: Click Close.0 11.0 STATUS -----VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID VALID .1.0.0.6.0 11.6.0 11.0 11.0 11. SQL> select comp_name.6. COMP_NAME --------------------------------------Oracle Enterprise Manager OLAP Catalog Spatial Oracle Multimedia Oracle XML Database Oracle Text Oracle Data Mining Oracle Expression Filter Oracle Rule Manager Oracle Workspace Manager Oracle Database Catalog Views Oracle Database Packages and Types JServer JAVA Virtual Machine Oracle XDK Oracle Database Java Packages VERSION ---------11.0 11.Figure 5 10.1.0.6.1.1.0.0.1.

0/db_1 merlin1-> $ORA_CRS_HOME/bin/crs_stat -t Name Type Target State Host -----------------------------------------------------------ora..gsd application ONLINE ONLINE merlin2 ora.0 VALID merlin1-> srvctl config database -d devdb merlin1 devdb1 /u01/app/oracle/product/11. value from v$parameter where name like '%dump_dest' or name like 'diag%'.devdb.inst application ONLINE ONLINE merlin2 ora.1...0..asm application ONLINE ONLINE merlin2 ora...0/db_1 merlin2 devdb2 /u01/app/oracle/product/11..0.b2.in1.2.N2.0 VALID 11..OLAP Analytic Workspace Oracle OLAP API Oracle Real Application Clusters 18 rows selected..SM2.SM1..ons application ONLINE ONLINE merlin1 ora.lsnr application ONLINE ONLINE merlin1 ora..in1.. however having one provides the benefits of being able to apply patches or patchsets to the Oracle RDBMS home.....6.0.inst application ONLINE ONLINE merlin1 ora..ons application ONLINE ONLINE merlin2 ora.b1...6.N1.1.1....db application ONLINE ONLINE merlin1 ora.6. independently from the ASM home.in1. At this point.1..in2.0/db_1 merlin1-> srvctl config asm -n merlin2 .asm application ONLINE ONLINE merlin1 ora.... your ASM home is still running off the Oracle Database 10g Home.vip application ONLINE ONLINE merlin1 ora.0 VALID 11. 11.... The ASM instance availability will not be impacted when the Oracle RDBMS home needs to be patched. Having a separate ASM home and RDBMS home is especially beneficial when running more than one database instances on the same node... merlin1-> srvctl config asm -n merlin1 +ASM1 /u01/app/oracle/product/10.in2.. NAME -------------------background_dump_dest user_dump_dest core_dump_dest diagnostic_dest VALUE -------------------------------------------------/u01/app/oracle/diag/rdbms/devdb/devdb1/trace /u01/app/oracle/diag/rdbms/devdb/devdb1/trace /u01/app/oracle/diag/rdbms/devdb/devdb1/cdump /u01/app/oracle 5.1.lsnr application ONLINE ONLINE merlin2 ora.gsd application ONLINE ONLINE merlin1 ora.vip application ONLINE ONLINE merlin2 The new diagnostic location SQL> select name. Upgrade Oracle ASM A separate ASM home is optional.in2.....

stop the database and start up the DBUA.2. 10.1. Execute /u01/app/oracle/product/11. Specify Home Details: a. ORACLE_HOME=/u01/app/oracle/product/11. Click Select All. Select Cluster Installation./.0/asm and modify the ORACLE_HOME variable in the shell profile to reflect the new ASM home. b. Name: OraASM11g_home. . 5. End of Installation: Click Exit. c. Database Administrator (OSDBA) Group: dba b. Select Installation Type: a. b.0/db_1 Create the ASM home As the oracle user on both nodes.1.1.1. ASM administrator (OSASM) Group: dba 9.0/asm. 12. 11. 3.0/asm/root.sh on merlin2. Oracle Base: /u01/app/oracle. Select Configuration Option: a. Privileged Operating System Groups: a. 8. 6. Upgrade an Existing Database: a.+ASM2 /u01/app/oracle/product/10. Product-Specific Prerequisite Checks: Verify overall result is successful. 2.0/asm/root. b. Execute /u01/app/oracle/product/11. . Select Enterprise Edition. Specify Hardware Cluster Installation Mode: a. 7. Return to the Execute Configuration scripts screen on merlin1 and click on OK. merlin1-> . Path: /u01/app/oracle/product/11. a. Welcome: Click Next. 4. Database Operator (OSOPER) Group: oinstall c. create the new ASM home mkdir /u01/app/oracle/product/11. Do you want to perform an upgrade now?: No. Execute Configuration scripts: Execute the scripts below as the root user. Select Install Software Only. Summary: Click Install. Upgrade ASM As the oracle user on merlin1.1.0/asm Install Oracle Database 11g Release 1 software in ASM home As the oracle user on merlin1.profile merlin1-> /stage/database/runInstaller 1.sh on merlin1.

Welcome: Click Next. Figure 6 .0/asm/bin/dbua 1.1. Summary: Click Finish. 3.merlin1-> srvctl stop database -d devdb merlin1-> /u01/app/oracle/product/11. Upgrade Operations: Select Upgrade Automatic Storage Management Instance. 2.

inst application ONLINE ONLINE merlin2 ora.1.asm application ONLINE ONLINE merlin2 ora.in1.b2.......Figure 7 4..0/asm merlin1-> srvctl start database -d devdb merlin1-> crs_stat -t Name Type Target State Host -----------------------------------------------------------ora..0/asm merlin1-> srvctl config asm -n merlin2 +ASM2 /u01/app/oracle/product/11. Upgrade Results: Click Close.... merlin1-> srvctl config asm -n merlin1 +ASM1 /u01/app/oracle/product/11.db application ONLINE ONLINE merlin1 ora...1.gsd application ONLINE ONLINE merlin1 ora... 5..in1.asm application ONLINE ONLINE merlin1 ora.inst application ONLINE ONLINE merlin1 ora.SM2..devdb..ons application ONLINE ONLINE merlin2 ora..SM1.vip application ONLINE ONLINE merlin2 .vip application ONLINE ONLINE merlin1 ora.gsd application ONLINE ONLINE merlin2 ora.....lsnr application ONLINE ONLINE merlin2 ora.ons application ONLINE ONLINE merlin1 ora...b1...in2..in2..N2.in2.lsnr application ONLINE ONLINE merlin1 ora. Progress: Click OK to see the results of the upgrade.in1.....N1....

As the final step. the database compatibility parameter and the disk group compatibility attributes have to be changed to 11. to utilize the new features of Oracle Database 11g.0 SQL> alter system set compatible='11.0' scope=spfile. merlin1-> srvctl stop database -d devdb merlin1-> srvctl start database -d devdb On ASM1 instance.Figure 8 Modify Disk Group Compatibility Attributes and Database Compatibility parameter.1.----------. . SQL> show parameter compatible NAME TYPE VALUE -----------------------.0. restart the database.------------------------compatible string 10. On devdb1 instance.2.1.0. On merlin1. System altered.1.

memory management is further automated with the use of the dynamic parameter.1.0 10. For a more comprehensive list. Explore Oracle Database 11g This section briefly describes a few of the new features of Oracle Database 11g.0.0.1. Partitioning by integer value . Diskgroup altered.rdbms'='11.0. memory_target.1.0 DATABASE_COMPATIBILI -------------------10. NAME --------------DG1 RECOVERYDEST COMPATIBILITY ------------10.SQL> select name.1. A detailed description of the new features is beyond the scope of this guide.0. The view.1. Diskgroup altered.0.0.0 6. NAME --------------DG1 RECOVERYDEST COMPATIBILITY ------------11.1).0 10.0 11.1. SQL> select name.compatibility. see the Oracle Database New Features Guide 11g Release 1 (11.compatibility.0.0.asm'='11.1.0.1.0.0.0'.0.With Oracle Database 11g. Diskgroup altered. SQL> alter diskgroup dg1 set attribute 'compatible.1. You would just be required to specify the total instance memory size and the database will automatically manages the memory distribution between the SGA and the PGA.database_compatibility from v$asm_diskgroup.0'.1.rdbms'='11.asm'='11.0. SQL> alter diskgroup recoverydest set attribute 'compatible. Interval Partitioning improves partition table manageability by creating new table partitions automatically when inserted rows exceed the partition ranges.0'. SQL> alter diskgroup recoverydest set attribute 'compatible.0 DATABASE_COMPATIBILI -------------------11.0 SQL> alter diskgroup dg1 set attribute 'compatible.database_compatibility from v$asm_diskgroup.1.1.0 11.0.0'. Automatic Memory Management . v$memory_target_advice provides advice on memory tuning.0. Diskgroup altered.0.

name varchar2(10).high_value 2 from user_tab_partitions 3 where table_name='PATIENTS'.high_value 2 from user_tab_partitions 3 where table_name='PATIENTS'.address varchar2(15) ) partition by range (patientid) interval (100) (partition p1 values less than (100)) / Table created. . SQL> select partition_name.SQL> 2 3 4 5 6 7 create table patients ( patientid number not null. SQL> select partition_name.high_value 2 from user_tab_partitions 3 where table_name='USERLOGS'. PARTITION_NAME --------------P1 SYS_P81 HIGH_VALUE --------------100 200 SQL> select count(*) from patients partition (SYS_P81).'ROBERT'. PARTITION_NAME HIGH_VALUE --------------. 3 transdt date. Table created. SQL> select partition_name.--------------P1 100 SQL> insert into patients values (100.'mm-ddyyyy')) 10 ). 1 row created. 4 terminal varchar2(10) 5 ) 6 partition by range (transdt) 7 interval (numtoyminterval(1. COUNT(*) ---------1 Partitioning by date SQL> create table userlogs ( 2 transid number.'4 BORNE AVE').'YEAR')) 8 ( 9 partition p1 values less than (to_date('01-01-2007'.

. 'SYYYY-MM-DD HH24:MI:SS'. Table altered. SQL> select partition_name. SQL> 2 3 4 5 6 7 create table patients ( patientid number not null.'11-AUG-07'. 'SYYYY-MM-DD HH24:MI:SS'. partition p2 values less than (200)) / Table created. SQL> alter table patients 2 add constraint patients_pk primary key (patientid). 'SYYYY-MM-DD HH24:MI:SS'. 1 row created.'XAV0004'). SQL> 2 3 4 5 6 create table invoices ( invoiceno number.amount number. Table created.PARTITION_NAME HIGH_VALUE -------------------------------------------------------------------------------------------P1 TO_DATE(' 2007-01-01 00:00:00'. constraint invoices_fk foreign key (patientid) references patients ) partition by reference (invoices_fk). 'NLS_CALENDAR=GREGORIA SQL> select count(*) from userlogs partition (sys_p42). PARTITION_NAME HIGH_VALUE -------------------------------------------------------------------------------------------P1 TO_DATE(' 2007-01-01 00:00:00'. patientid number not null. COUNT(*) ---------1 Reference Partitioning partitions a child table based on the partitioning scheme of the parent table. address varchar2(15) ) partition by range (patientid) (partition p1 values less than (100). 'NLS_CALENDAR=GREGORIA SYS_P42 TO_DATE(' 2008-01-01 00:00:00'.name varchar2(10). 'NLS_CALENDAR=GREGORIA SQL> insert into userlogs values (1.high_value 2 from user_tab_partitions 3 where table_name='USERLOGS'.

1). COUNT(*) ---------1 SQL> select count(*) from invoices partition (p2). COUNT(*) ---------0 SQL> insert into patients values (110.GET_DDL('TABLE'. "AMOUNT" NUMBER. SQL> select count(*) from invoices partition (p1). 1 row created.'VCHAN') from dual.110).500.'INVOICES'. 1 row created. SQL> insert into invoices values (150. CONSTRAINT "INVOICES_FK" FOREIGN KEY ("PATIENTID") REFERENCES "VCHAN".'88 Palace Ave').'VCHAN') ----------------------------------------------------------------------CREATE TABLE "VCHAN". COUNT(*) . 1 row created. SQL> insert into invoices values (151. SQL> select count(*) from invoices partition (p1)."INVOICES" ( "INVOICENO" NUMBER.01.'TOBY'. PARTITION "P2" PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" NOCOMPRESS ) SQL> insert into patients values (1.'INVOICES'.SQL> select dbms_metadata. "PATIENTID" NUMBER NOT NULL ENABLE. DBMS_METADATA.262. 1 row created.12.get_ddl('TABLE'.'GILY'.'512 HILE STREET')."PATIENTS" ("PATIENTID") ENABLE ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE( BUFFER_POOL DEFAULT) PARTITION BY REFERENCE ("INVOICES_FK") (PARTITION "P1" PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" NOCOMPRESS .

Elapsed: 00:00:8.col2 varchar2(26)) tablespace tbs1 compress for all operations. COUNT(*) ---------1 Table Compression in Oracle Database 11g supports conventional DML and drop column operations. Tablespace created. SQL> alter system flush buffer_Cache. System altered.07 SQL> alter system flush buffer_Cache. Table created.dbf' size 500M. Compressed data are not uncompressed during reading and thus queries on compressed data are noticeably faster since there are fewer data block reads. SQL> create tablespace tbs1 datafile '/u01/app/oracle/oradata/db11g/tbs1_01.---------1 SQL> select count(*) from invoices partition (p2). . System altered. 2000000 rows created. Commit complete.dbf' size 500M. SQL> alter system flush shared_pool. SQL> set timing on SQL> insert into mytable_nocompress 2 select 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'. Elapsed: 00:00:00.'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 3 from (select 1 from dual connect by level <= 2000000). SQL> create table mytable_nocompress (col1 varchar2(26).07 SQL> commit.col2 varchar2(26)) tablespace tbs2. Table created. SQL> create tablespace tbs2 datafile '/u01/app/oracle/oradata/db11g/tbs2_01. SQL> create table mytable_compress (col1 varchar2(26). Tablespace created.

SQL> insert into mytable_compress 2 select 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'. Elapsed: 00:00:00. Commit complete. SEGMENT_NAME EXTENTS -----------------------------.04 Conclusion: As illustrated in this guide.04 SQL> select segment_name. start unleashing the power of the next generation database. TABLESPACE_NAME BYTES/1024/1024 -----------------------------. please refer to the Oracle Database Upgrade Guide 11g Release 1. Elapsed: 00:00:21.9375 SQL> alter table mytable_compress drop column col2. Table altered. .'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 3 from (select 1 from dual connect by level <= 2000000). the upgrade procedure is simpler and more streamlined with each database release.79 SQL> commit. 2000000 rows created. Hopefully this guide has provided you a concise method of upgrading your RAC environment.9375 TBS2 363.extents from user_segments where segment_name like 'MYTABLE%'. Elapsed: 00:00:41. For a detailed installation instruction. Now that you have upgraded to Oracle Database 11g.--------------TBS1 461. System altered.---------MYTABLE_COMPRESS 53 MYTABLE_NOCOMPRESS 88 SQL> select tablespace_name. SQL> alter system flush shared_pool.bytes/1024/1024 from dba_free_space where tablespace_name like 'TBS%'.System altered.

Sign up to vote on this title
UsefulNot useful