world)
(INSTANCE_NAME = rac3)
)
)
RAC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = voc2)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac.world)
(INSTANCE_NAME = rac2)
)
)
RAC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = voc1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac.world)
(INSTANCE_NAME = rac1)
)
)
Notice that each node in the RAC database has its own entry so that you may connect to a
specific node when necessary. Note also that the hostnames for each node are using the virtual
node names instead of the physical node names.
Running the Oracle Network Configuration Assistant (netca) on a RAC node gives you many
more options for service failover. In this example, I create a service called racsvc with rac1 as the
preferred node for all connections but failing over to node rac2 or rac3 if rac1 goes down, as you
can see in the resulting entry in tnsnames.ora:racsvc:
(description =
(address = (protocol = tcp)(host = voc1)(port = 1521))
(address = (protocol = tcp)(host = voc2)(port = 1521))
(address = (protocol = tcp)(host = voc3)(port = 1521))
(load_balance = yes)
(connect_data =
(server = dedicated)
(service_name = racsvc.world)
(failover_mode =
(type = select)
(method = basic)
(retries = 180)
(delay = 5)
)
)
Chapter 10: Real Application Clusters 377
The entry for racsvc has a few additional parameters for FAILOVER_MODE; these modes and
their values are defined in the following list:
type The type of failover.
Pages:
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594