RAC Implementation 10GR2
RAC Implementation 10GR2
DOCUMENTATION FOR
<Customer Name>
Prepared By:
Rev: 1.0
Page 1
2 Node 10G Release 2 RAC IMPLEMENTATION
Table of Contents
1 REVISION HISTORY............................................................................................................... 3
2 APPROVALS.......................................................................................................................... 4
3 EXISTING INFRASTRUCTURE.............................................................................................. 5
4 TECHNICAL SOLUTION........................................................................................................ 6
Page 2
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 3
2 Node 10G Release 2 RAC IMPLEMENTATION
1 Revision History
Page 4
2 Node 10G Release 2 RAC IMPLEMENTATION
2 Approvals
Task Name Signature Date
Approved by M/s <Customer Name>
Page 5
2 Node 10G Release 2 RAC IMPLEMENTATION
3 Existing Infrastructure
The existing infrastructure is listed below
Page 6
2 Node 10G Release 2 RAC IMPLEMENTATION
4 Technical Solution
In order to improvise the database high availability and to enable to balance the load, <Customer
Name> opted for implementing 2 node 10G Release 2 Oracle Real Application Cluster on
Automatic Storage Management (ASM). Oracle CRS was installed on both the nodes, which was
the base layer for installing the Oracle 10G Release 2 Real Application Cluster binaries. All the
data volumes were installed using ASM to enable better I/O performance & database
maintenance.
IMPLEMENTATION PHASE
During the implementation phase, fail over testing was done at the database level after
configuring Transparent Application Fail over (TAF) at the server level. This feature enables to
have an effective fail over to another node, incase the connected node shuts down abruptly.
The Oracle instances in the RAC configuration write information to ASM defined for:
The spfile.ora
Each datafile
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# useradd -g oinstall -G dba –d /oracle oracle
Page 7
2 Node 10G Release 2 RAC IMPLEMENTATION
# passwd oracle
Before you install and use Oracle Real Application Clusters, you should configure secure shell
(SSH) for the oracle user on all cluster nodes. Oracle Universal Installer uses the rsh and scp
commands during installation to run remote commands on and copy files to the other cluster
nodes. You must configure SSH (or RSH) so that these commands do not prompt for a password.
Use the following steps to create the RSA key pair. Please note that these steps will need to be
completed on both Oracle RAC nodes in the cluster:
2. If necessary, create the .ssh directory in the oracle user's home directory and set the
correct permissions on it:
$ mkdir -p ˜/.ssh
$ chmod 700 ˜/.ssh
3. Enter the following command to generate an RSA key pair (public and private key) for
version 3 of the SSH protocol:
$ /usr/bin/ssh-keygen -t rsa
At the prompts:
o Enter and confirm a pass phrase. This should be different from the oracle user
account password; however it is not a requirement i.e. you do not have to enter
any password.
This command will write the public key to the ˜/.ssh/id_rsa.pub file and the private key to
the ˜/.ssh/id_rsa file. Note that you should never distribute the private key to anyone.
4. Repeat the above steps for each Oracle RAC node in the cluster.
Now that both Oracle RAC nodes contain a public and private key pair for RSA, you will need to
create an authorized key file on one of the nodes. An authorized key file is nothing more than a
single file that contains a copy of everyone's (every node's) RSA public key. Once the authorized
key file contains all of the public keys, it is then distributed to all other nodes in the RAC cluster.
Complete the following steps on one of the nodes in the cluster to create and then distribute the
authorized key file. For the purpose of this article, I am using indc1s209.
Page 8
2 Node 10G Release 2 RAC IMPLEMENTATION
are working with a new install. If the file doesn't exist, create it now:
$ touch ˜/.ssh/authorized_keys
$ cd ˜/ssh
2. In this step, use SSH to copy the content of the ˜/.ssh/id_rsa.pub public key from each
Oracle RAC node in the cluster to the authorized key file just created
(˜/.ssh/authorized_keys). Again, this will be done from indc1s209. You will be prompted
for the oracle user account password for both Oracle RAC nodes accessed. Notice that
when using SSH to access the node you are on (indc1s209), the first time it prompts for
the oracle user account password. The second attempt at accessing this node will prompt
for the pass phrase used to unlock the private key. For any of the remaining nodes, it will
always ask for the oracle user account password.
The following example is being run from indc1s209 and assumes a 2-node cluster, with
nodes indc1s209 and indc1s210:
Note: The first time you use SSH to connect to a node from a particular system, you may
see a message similar to the following:
Enter yes at the prompt to continue. You should not see this message again when you
connect from this system to the same node.
3. At this point, we have the content of the RSA public key from every node in the cluster in
the authorized key file (˜/.ssh/authorized_keys) on indc1s209. We now need to copy it to
the remaining nodes in the cluster. In out two-node cluster example, the only remaining
node is indc1s210. Use the scp command to copy the authorized key file to all remaining
nodes in the cluster:
Page 9
2 Node 10G Release 2 RAC IMPLEMENTATION
4. Change the permission of the authorized key file for both Oracle RAC nodes in the
cluster by logging into the node and running the following:
5. At this point, if you use ssh to log in or run a command on another node, you are
prompted for the pass phrase that you specified when you created the RSA key. For
example, test the following from indc1s209:
In this setup, we have 1 raw device of 256MB for OCR, 1 raw device of 256MB for Voting Disk,
1 raw device of 256GB for database files and 1 raw device of 256Gb for archivelogs.The
ownership and permissions of the raw devices need to be set as follows.
Page 10
2 Node 10G Release 2 RAC IMPLEMENTATION
Note: Automatic Undo Management requires an undo tablespace per instance therefore you
would require a minimum of 2 tablespaces.
# projadd oracle
Assign the oracle project to the oracle user by adding the following line to the /etc/user_attr file
oracle::::project=oracle
Create “oracle” user & “dba” group on 2 nodes with administrator user privileges on
partner node, to update the node registry information.
On the node from which you will run the Oracle Universal Installer, set up user
equivalence by adding entries for all nodes in the cluster, including the local node.
On both the nodes setup the hosts file with the following entries:
10.200.1.55 indc1s209
10.200.1.57 indc1s210
192.168.1.2 indc1s209-priv
192.168.1.3 indc1s210-priv
Page 11
2 Node 10G Release 2 RAC IMPLEMENTATION
10.200.1.59 indc1s209-vip
10.200.1.60 indc1s210-vip
Post setting up the “hosts” file; please ensure to reboot both the nodes, to take effect of
the new hosts file.
Ensure that the IP allotted to “indc1s209-vip” & “indc1s210-vip” is of the same class as
that of Public IP.
If one has to include the IP entries in the DNS file, include both the “vip” entries
including the PUBLIC IPs. All the listeners on both the nodes would be configured on
“vip” entries.
Execute the following commands to check whether the required prerequisites are met
prior to initiating the clusterware installation.
Go to /oracle/cluster/cluvfy & run the following command
$ runcluvfy.sh stage -pre crsinst -n indc1s209,indc1s210
Please note :- An error for “vip” node detection failed could be ignored, as there is a
known bug in the runcluvfy.bat file for all IPs starting with “192”, “10”or “172”series.
Determine the complete path for the raw devices or shared file systems, and set up the
voting disk and Oracle Cluster Registry partitions
o During installation, at the Cluster Configuration Storage page, you are asked to
provide paths for two files that must be shared across all nodes of the cluster,
either on a shared raw device, or a shared file system file:
o The Cluster Synchronization Services (CSS) voting disk is a partition that Oracle
Clusterware uses to verify cluster node membership and status. Provide at least
256 MB disk space for the voting disk.
o The Oracle Cluster Registry (OCR) contains cluster and database configuration
information for the RAC database and for Oracle Clusterware, including the node
list, and other information about cluster configuration and profiles. Provide at
least 256 MB disk space for the OCR.
o In addition, if you intend to use ASM, do not format the partitions that you want
to use for ASM.
o Ensure that you create at least the minimum required partitions for installation.
Host names, private names, and virtual host names are not domain-qualified. If you
provide a domain in the address field during installation, then the OUI removes the
domain from the address.
Page 12
2 Node 10G Release 2 RAC IMPLEMENTATION
Private IP addresses should not be accessible as public interfaces. Using public interfaces
for Cache Fusion can cause performance problems.
Determine your cluster name, public node names, private node names, and virtual node
names for each node in the cluster
If you install the cluster ware during installation, and are not using third-party vendor
cluster ware, then you are asked to provide a public node name and a private node name
for each node. Use your third-party vendor documentation to complete setup of your
public and private domain addresses.
When you enter the public node name, use the primary host name of each node. In other
words, use the name displayed by the hostname command but without any portion of the
domain name that may be returned by the command.
It must be at least one character long and less than 15 characters long
It must consist of the same character set used for host names:
underscores (_), hyphens (-), and single-byte alphanumeric characters (a
to z, A to Z, and 0 to 9). If you use third-party vendor clusterware, then
Oracle recommends that you use the vendor cluster name
o Determine a private node name or private IP address for each node. The private
IP address is an address that is only accessible by the other nodes in this cluster.
Oracle uses private IP addresses for inter-node, or instance-to-instance Cache
Fusion traffic. Oracle recommends that you provide a name in the format
public_hostname-priv. Example: DB-priv.
o Determine a virtual host name for each node. A virtual host name is a public
node name that is used to reroute client requests sent to the node if the node is
down. Oracle uses virtual IP addresses (VIPs) for client to database connections,
so the VIP address must be publicly accessible. Oracle recommends that you
provide a name in the format public_hostname-vip. Example: DB-vip
Page 13
2 Node 10G Release 2 RAC IMPLEMENTATION
2. After you click Next on the Welcome page, you are prompted for the inventory location and the
dba group. On the next screen, the Specify File Locations page will allow you to accept the
displayed path name for the Oracle Clusterware products or select a different one. You may also
accept default directory and path name for the location of your Oracle Clusterware home or
browse for an alternate directory and destination. You must select a destination that exists on each
cluster node that is part of this installation. Click Next to confirm your choices.
Page 14
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 15
2 Node 10G Release 2 RAC IMPLEMENTATION
4. The installer verifies that your environment meets all of the minimum requirements for installing
and configuring the products that you have chosen to install. The results are displayed on the
Product-Specific Prerequisite Checks page. Verify and confirm the items that are flagged with
warnings and items that require manual checks. After you confirm your configuration, the OUI
proceeds to the Cluster Configuration page.
Note:
If the check identifies an existing, local CSS, you must shutdown the
Oracle database and ASM instance from the Oracle home where
CSS is running. To accomplish this, run the following command, using
the existing Oracle home, in a separate window before you continue
with the installation:
Oracle home\bin\localconfig delete
Page 16
2 Node 10G Release 2 RAC IMPLEMENTATION
5. The Cluster Configuration page contains predefined node information if the OUI detects that your
system has the Oracle9i Release 2 clusterware. Otherwise, the OUI displays the Cluster
Configuration page without predefined node information.
Provide your own cluster name if you do not wish to use the name provided by the OUI. Note that
the selected cluster name must be globally unique throughout the enterprise and its allowable
character set is the same as that for hostnames, that is, underscores (_), hyphens (-), and single-
byte alphanumeric characters (a to z, A to Z, and 0 to 9).
Page 17
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 18
2 Node 10G Release 2 RAC IMPLEMENTATION
6. Enter a public, a virtual, and a private host name for each node. Do not include a domain qualifier
with the host names. When you enter the public host name, use the primary host name of each
node, that is, the name displayed by the hostname command. The virtual node name is the name to
be associated with the VIP for the node. The private node refers to an address that is only
accessible by the other nodes in this cluster, and which Oracle uses for Cache Fusion processing.
You should enter the private host name for each node.
Note:
You may provide the cluster configuration information in a text file
instead of entering it in the individual fields on the Cluster
Configuration page. The contents of your cluster configuration file
should be similar to the following example:
Cluster configuration file:
--------------------------------------------------
# Cluster Name
crs
# Node Information
Page 19
2 Node 10G Release 2 RAC IMPLEMENTATION
Click Next after you have entered the cluster configuration information. This saves your entries
and opens the Specify Network Interface Usage page.
7. In the Specify Network Interface Usage page the OUI displays a list of cluster-wide interfaces.
Use the drop-down menus on this page to classify each interface as Public, Private, or Do Not
Use. The default setting for each interface is Do Not Use. You must classify at least one
interconnect as Public and one as Private. Click Next when you have made your selections to open
the Select Disk Formatting Options page.
8. On the Cluster Configuration Storage page, identify the disks that you want to use for the Oracle
Clusterware files. Enter the path of each of these disks one at a time
Page 20
2 Node 10G Release 2 RAC IMPLEMENTATION
Notes:
The OUI page described in this step displays logical drives from which you must
make your selections.
If you are installing on a cluster with an existing cluster file system from an earlier
release of Oracle, then the OCR and voting disk will be stored in that file system. In
this case, you do not require new partitions for the OCR and voting disk, even if you
do not format a logical drive for data file storage.
Page 21
2 Node 10G Release 2 RAC IMPLEMENTATION
9. After you click Next, the OUI checks whether the remote inventories are set. If they are not set,
then the OUI sets up the remote inventories by setting registry keys. The OUI also verifies the
permissions to enable writing to the inventory directories on the remote nodes. After completing
these actions, the OUI displays a Summary page that shows the cluster node information along
with the space requirements and availability. Verify the installation that the OUI is about to
perform and click Finish.
Page 22
2 Node 10G Release 2 RAC IMPLEMENTATION
10. When you click Finish, the OUI installs the Oracle Clusterware software on the local node and
validates the installation again. After validating the installation, the OUI completes the Oracle
Clusterware software installation and configuration on the remote nodes.
Page 23
2 Node 10G Release 2 RAC IMPLEMENTATION
11. Run the above scripts as mentioned on each node. Post the clusterware installation, invoke the
VIPCA from /oracle/product/10.2.0/crs_1/bin to configure the VIP’s.
Page 24
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 25
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 26
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 27
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 28
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 29
2 Node 10G Release 2 RAC IMPLEMENTATION
5.9 Using the Oracle Universal Installer to install Oracle 10.2.0.1 Real Application
Clusters binaries software
Follow these procedures to use the Oracle Universal Installer to install the Oracle Enterprise
Edition Cluster Ware installation and the Real Application Clusters software. To install the
Oracle 10G Release 2 RAC binaries, perform the following:
# /oracle/product/10.2.0/crs_1/bin/crs_stat
Execute the command on both the nodes. Once the commands are executed successfully
on both the nodes, perform the next steps
A prompt will appear for the Inventory Location (if this is the first time that OUI has
been run on this system). This is the base directory into which OUI will install files. The
Page 30
2 Node 10G Release 2 RAC IMPLEMENTATION
Select the installation type. Choose the Standard Edition option. The selection on this
screen refers to the installation operation, not the database configuration. The next screen
allows for a customized database configuration to be chosen. Click Next.
The File Location window will appear. Do NOT change the Source field. The
Destination field defaults to the ORACLE_HOME environment variable. Click Next.
Page 31
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 32
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 33
2 Node 10G Release 2 RAC IMPLEMENTATION
The Summary screen will be presented. Confirm that the RAC database software will be
installed and then click Install. The OUI will install the Oracle 10.2.0.1 software on to
the local node, and then copy this information to the other nodes selected.
Page 34
2 Node 10G Release 2 RAC IMPLEMENTATION
Once Install is selected, the OUI will install the Oracle RAC software on to the local
node, and then copy software to the other nodes selected earlier. This will take some
time. During the installation process, the OUI does not display messages indicating that
components are being installed on other nodes - I/O activity may be the only indication
that the process is continuing.
Page 35
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 36
2 Node 10G Release 2 RAC IMPLEMENTATION
Navigate to the patch directory and invoke the runinstaller. Click next on the
welcome screen.
Page 37
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 38
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 39
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 40
2 Node 10G Release 2 RAC IMPLEMENTATION
Click Next on the summary screen to start the Patch installation for CRS
Page 41
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 42
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 43
2 Node 10G Release 2 RAC IMPLEMENTATION
Exit the installer and invoke it once again from the same location for patching the
database binaries
Page 44
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 45
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 46
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 47
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 48
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 49
2 Node 10G Release 2 RAC IMPLEMENTATION
Prior to running the DBCA it is necessary to run the “netca” utility to configure the listener or to
manually set up your network files. This will configure the necessary listener names and protocol
addresses, client naming methods, Net service names. Listener are configured with the following
names i.e. LISTENER_INDC1S209 and LISTENER_INDC1S210 to listen on port 1521. It
should be ensured that any new listeners configured should be running on different port other
than configured. The configuration file is attached below:
LISTENER_INDC1S209 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = indc1s209-vip)(PORT = 1521)(IP
= FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.200.1.55)(PORT = 1521)(IP =
FIRST))
)
)
Page 50
2 Node 10G Release 2 RAC IMPLEMENTATION
LISTENER_INDC1S210 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = indc1s210-vip)(PORT = 1521)(IP
= FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.200.1.57)(PORT = 1521)(IP =
FIRST))
)
)
Page 51
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 52
2 Node 10G Release 2 RAC IMPLEMENTATION
Select Add
Page 53
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 54
2 Node 10G Release 2 RAC IMPLEMENTATION
Select TCP
Page 55
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 56
2 Node 10G Release 2 RAC IMPLEMENTATION
Select No
Page 57
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 58
2 Node 10G Release 2 RAC IMPLEMENTATION
ECDSNOD1.__db_cache_size=1191182336
ECDSNOD2.__db_cache_size=1191182336
ECDSNOD1.__java_pool_size=16777216
ECDSNOD2.__java_pool_size=16777216
ECDSNOD1.__large_pool_size=16777216
ECDSNOD2.__large_pool_size=16777216
ECDSNOD1.__shared_pool_size=352321536
ECDSNOD2.__shared_pool_size=352321536
ECDSNOD1.__streams_pool_size=0
ECDSNOD2.__streams_pool_size=0
*.audit_file_dest='/oracle/product/10.2.0/db_1/admin/INDCECDS/adump'
*.background_dump_dest='/oracle/product/10.2.0/db_1/admin/INDCECDS/bdump
'
*.cluster_database_instances=2
*.cluster_database=true
*.compatible='10.2.0.3.0'
*.control_files='+DGDATA/INDCECDS/control01.ctl','+DGDATA/INDCECDS/contr
ol02.ctl','+DGDATA/INDCECDS/control03.ctl'
*.core_dump_dest='/oracle/product/10.2.0/db_1/admin/INDCECDS/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='INDCECDS'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ECDSNODXDB)'
ECDSNOD1.instance_number=1
ECDSNOD2.instance_number=2
*.job_queue_processes=10
*.log_archive_dest_1='LOCATION=+DGARCH/'
*.log_archive_format='ECDSNOD_%t_%s_%r.arc'
*.open_cursors=300
*.pga_aggregate_target=2548039680
*.processes=150
*.remote_listener='LISTENERS_INDCECDS'
*.remote_login_passwordfile='exclusive'
*.sga_target=1610612736
ECDSNOD2.thread=2
ECDSNOD1.thread=1
*.undo_management='AUTO'
ECDSNOD1.undo_tablespace='UNDOTBS1'
ECDSNOD2.undo_tablespace='UNDOTBS2'
*.user_dump_dest='/oracle/product/10.2.0/db_1/admin/INDCECDS/udump'
Page 59
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 60
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 61
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 62
2 Node 10G Release 2 RAC IMPLEMENTATION
Enter the password for the ASM instance as sys. Select create initialization parameter
file and click next.
Page 63
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 64
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 65
2 Node 10G Release 2 RAC IMPLEMENTATION
Click on OK
Page 66
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 67
2 Node 10G Release 2 RAC IMPLEMENTATION
Click on OK
Page 68
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 69
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 70
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 71
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 72
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 73
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 74
2 Node 10G Release 2 RAC IMPLEMENTATION
Enter the name for the RAC database. For each cluster database instance, the SID is
comprised of a common prefix for the database and a number for each instance that is
automatically generated.
Page 75
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 76
2 Node 10G Release 2 RAC IMPLEMENTATION
Specify the database user passwords. Here the password is given as indecds.
Page 77
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 78
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 79
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 80
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 81
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 82
2 Node 10G Release 2 RAC IMPLEMENTATION
Click on Next.
Page 83
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 84
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 85
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 86
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 87
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 88
2 Node 10G Release 2 RAC IMPLEMENTATION
Click on exit. Oracle will now start the RAC instance on both nodes.
Page 89
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 90
2 Node 10G Release 2 RAC IMPLEMENTATION
INDCECDS =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = indc1s209-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = indc1s210-vip)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = INDCECDS)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 5)
(DELAY = 5)
)
)
)
Page 91
2 Node 10G Release 2 RAC IMPLEMENTATION
In “indc1s209”,
In “indc1s210”,
HOST_NAME THREAD#
INDC1S209 1
Database unmounted
Database closed
HOST_NAME THREAD#
INDC1S210 2
Note, the session got failed over from instance 1 (ECDSNOD1) in indc1s209 to instance 2
(ECDSNOD2) indc1s210.
Page 92
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 93
2 Node 10G Release 2 RAC IMPLEMENTATION
Oracle 10G Release 2 Real Application Clusters serves as an important component of robust high
availability solutions. A properly configured Oracle 10G Release 2 Real Application Clusters
environment can tolerate failures with minimal downtime.
Oracle 10G Release 2 Real Application Clusters is also applicable for many other system types.
For example, data warehousing applications accessing read-only data are prime candidates for
Oracle 10G Release 2 Real Application Clusters. In addition, Oracle 10G Release 2 Real
Application Clusters successfully manages increasing numbers of online transaction processing
systems as well as hybrid systems that combine the characteristics of both read-only and
read/write applications.
Harnessing the power of multiple nodes offers obvious advantages. If you divide a large task into
sub-tasks and distribute the sub-tasks among multiple nodes, you can complete the task faster
than if only one node did the work. This type of parallel processing is clearly more efficient than
sequential processing. It also provides increased performance for processing larger workloads and
for accommodating growing user populations. Oracle 10G Release 2 Real Application Clusters
can effectively scale your applications to meet increasing data processing demands. As you add
resources, Oracle 10G Release 2 Real Application Clusters can exploit them and extend their
processing powers beyond the limits of the individual components.
From a functional perspective RAC is equivalent to single-instance Oracle. What the RAC
environment does offer is significant improvements in terms of availability, scalability and
reliability.
In recent years, the requirement for highly available systems, able to scale on demand, has
fostered the development of more and more robust cluster solutions. Prior to Oracle 10G Release
2, HP and Oracle, with the combination of Oracle Parallel Server and HP Service Guard OPS
edition, provided cluster solutions that lead the industry in functionality, high availability,
management and services. Now with the release of Oracle 10G Real Application Clusters (RAC)
with the new Cache Fusion architecture based on an ultra-high bandwidth, low latency cluster
interconnect technology, RAC cluster solutions have become more scalable without the need for
data and application partitioning. The information contained in this document covers the
installation and configuration of Oracle Real Application Clusters in a typical environment; a two
node HP cluster, utilizing the HP-UX operating system.
Page 94
2 Node 10G Release 2 RAC IMPLEMENTATION
The frequency of synchronization (the less frequent the better). The cache fusion
architecture reduces the frequency of the inter-node communication by
dynamically migrating locks to a node that shows a frequent access pattern for a
particular data block. This dynamic lock allocation increases the likelihood of
local cache access thus reducing the need for inter-node communication. At a
node level, a cache fusion lock controls access to data blocks from other nodes
in the cluster.
The latency of inter-node communication. This is a critical component in Oracle 10G
RAC as it determines the speed of data block transfer between nodes. An efficient
transfer method must utilize minimal CPU resources; support high availability as well as
highly scalable growth without bandwidth constraints.
The Transparent Application Failover (TAF) feature is a runtime failover for high-availability
environments, such as Oracle 10G Release 2 Real Application Clusters and Oracle 10G Release 2
Real Application Clusters Guard. TAF fails over and reestablishes application-to-service
connections. It enables client applications to automatically reconnect to the database if the
connection fails and, optionally, resume a SELECT statement that was in progress. The
reconnection happens automatically from within the Oracle Call Interface (OCI) library. To
understand the concept and working flow of TAF,first we need to understand the below failover
basics.
The process of synchronizing, or remastering, requires the graceful shutdown of the failing
system as well as an accurate assumption of control of the resources that were mastered on that
system. In Real Application Clusters, your system records resource information to remote nodes
as well as local. This makes the information needed for failover and recovery available to the
recovering instances.
Page 95
2 Node 10G Release 2 RAC IMPLEMENTATION
For existing users, failover entails both server and client failover actions
For new users, failover only entails the duration of server failover processing
8.3.3 Client Failover
It is important to hide system failures from database client connections. Such connections can
include application users in client server environments or middle-tier database clients in
multitiered application environments. Properly configured failover mechanisms transparently
reroute client sessions to an available node in the cluster. This capability in the Oracle database is
referred to as Transparent Application Failover
8.3.4 Transparent Application Failover
Transparent Application Failover (TAF) enables an application user to automatically
reconnect to a database if the connection fails. Active transactions roll back, but the new database
connection, which is achieved using a different node, is identical to the original. This is true
regardless of how the connection fails.
8.3.5 Elements Affected by Transparent Application Failover
There are several elements associated with active database connections. These include:
Active transactions
Transparent Application Failover automatically restores some of these elements. For example,
during normal client/server database operations, a client maintains a connection to the database so
the client and server can communicate. If the server fails, then so does the connection. The next
time the client tries to use the connection the client issues an error. At this point, the user must log
in to the database again.
With Transparent Application Failover, however, Oracle automatically obtains a new connection
to the database. This enables users to continue working as if the original connection had never
failed. Therefore, with Transparent Application Failover, a client notices no connection loss as
long as one instance remains active to serve the application
Page 96
2 Node 10G Release 2 RAC IMPLEMENTATION
Transactional Shutdowns
Load Balancing
To do this, you can use the ALTER SYSTEM statement with the QUIESCE RESTRICTED
clause. The QUIESCE RESTRICTED clause enables you to perform administrative tasks in
isolation from concurrent user transactions or queries.
Page 97
2 Node 10G Release 2 RAC IMPLEMENTATION
Note:
You cannot open the database on one instance if the database is being
quiesced on another node. In other words, if you issued the ALTER SYSTEM
QUIESCE RESTRICTED statement but it is not finished processing, you
cannot open the database. Nor can you open the database if it is already in a
quiesced state.
In Real Application Clusters, the Transport Network Services (TNS) listener files provide
automated load balancing across nodes in both shared server and dedicated server configurations.
Because the parameters that control cross-instance registration are also dynamic, Real
Application Clusters' load balancing feature automatically adjusts for cluster configuration
changes. For example, if you add a node to your cluster database, then Oracle updates all the
listener files in the cluster with the new node's listener information.
8.3.7 Database Client Processing During Failover
Failover processing for query clients is different than the failover processing for Database
Manipulation Language clients. The important issue during failover operations in either case is
that the failure is masked from existing client connections as much as possible. The following
subsections describe both types of failover processing.
8.3.7.1 Query Clients
At failover, in-progress queries are reissued and processed from the beginning. This might extend
the duration of the next query if the original query required longer to complete. With Transparent
Application Failover (TAF), the failure is masked for query clients with an increased response
time being the only issue affecting the client. If the client query can be satisfied with data in the
buffer cache of the surviving node to which the client reconnected, then the increased response
time is minimal. Using TAF's PRECONNECT method eliminates the need to reconnect to a
surviving instance and thus further minimizes response time. However, PRECONNECT allocates
resources awaiting the failover event.
After failover, server-side recovery must complete before access to the datafiles is allowed. The
client transaction experiences a system pause until server-side recovery completes, if server-side
recovery has not already completed.
You can also use a callback function through an OCI call to notify clients of the failover so that
the clients do not misinterpret the delay for a failure. This prevents the clients from manually
attempting to reestablish connections.
8.3.7.2 Database Manipulation Language Clients
Database Manipulation Language (DML) database clients perform INSERT, UPDATE, and
DELETE operations. Oracle handles certain errors and performs a reconnect when those errors
occur.
Page 98
2 Node 10G Release 2 RAC IMPLEMENTATION
Without this application code, INSERT, UPDATE, and DELETE operations on the failed
instance return an un-handled Oracle error code. Upon re-submission, Oracle routes the client
connections to a surviving instance. The client transaction then stops only momentarily until
server-side recovery completes.
8.3.8 Transparent Application Fail over Processing During Shutdowns
Queries that cross the network after shutdown processing completes will fail over. However,
Oracle returns an error for queries that are in progress during shutdowns. Therefore, TAF only
operates when the operating system returns a network error and the instance is completely down.
Applications that use TAF for transactional shutdown must be written to process the error
ORA-01033 "ORACLE initialization or shutdown in progress". In the event of a failure, an
instance will return error ORA-01033 once shutdown processing begins. Such applications need
to periodically retry the failed operation, even when Oracle reports multiple ORA-01033 errors.
When shutdown processing completes, TAF recognizes the failure of the network connection to
instance and restores the connection to an available instance.
Connection load balancing improves connection performance by balancing the number of active
connections among multiple dispatchers. In single-instance Oracle environments, the listener
selects the least loaded dispatcher to manage incoming client requests. In Real Application
Clusters environments, connection load balancing also has the capability of balancing the number
of active connections among multiple instances.
Due to dynamic service registration, a listener is always aware of all of the instances and
dispatchers regardless of their locations. Depending on the load information, a listener determines
to which instance and to which dispatcher to send incoming client requests if you are using the
shared server configuration.
In shared server configurations, listeners select dispatchers using the following criteria in the
order shown:
If a database service has multiple instances on multiple nodes, then the listener chooses the least
loaded instance on the least loaded node. If you have configured the shared server, then the least
loaded dispatcher of the selected instance is chosen.
8.3.9 Transparent Application Failover Restrictions
When a connection fails, you might experience the following:
Page 99
2 Node 10G Release 2 RAC IMPLEMENTATION
Page 100