For high availability and scalability, Oracle provides
the Transparent Application Failover (TAF) feature that is a part
of Real Application Clusters (RAC). TAF enables IBM® Product Master to
be available continuously in the event of database server failure.
About this task
The Oracle TAF feature supports failover of read transactions
only; write transactions during database failure are rolled back. Product Master continues
to run when there is a database failure. However, Product Master users
are required to resubmit the transaction after failure. Unsaved data is
lost and users are required to reenter the data. Because Oracle will
not load balance the existing database connections between all the
nodes after the failover, it is recommended that you restart Product Master after
the failover to use all the database server nodes.
For installation
and configuration of Oracle database with RAC, refer to the Oracle
documentation. It is recommended that you set up the server-side TAF
service on the Oracle server.
Procedure
- Configure the Oracle client for TAF.
- Configure the TAF parameters along with the Oracle RAC
nodes in the tnsnames.ora file of the Oracle
client. The following sample shows the
tnsnames
entry:
ibm.world =
(DESCRIPTION_LIST =
(FAILOVER = yes)
(LOAD_BALANCE = yes)
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = fresno1)(PORT = 1521)
(HOST = fresno2)(PORT=1521)
)
(CONNECT_DATA =
(SERVICE_NAME = ibm.world)
(SERVER = dedicated)
(FAILOVER_MODE =
(BACKUP=ibm.world.bkp)
(TYPE=select)
(METHOD=preconnect)
(RETRIES=20)
(DELAY=3)
)
)
)
)
The
FAILOVER_MODE
section of the
tnsnames.ora file
lists the failover parameters and their values:
- BACKUP=ibm.world.bkp
- This parameter names the backup service name that takes over failed
connections when a node crashes. In this example, the primary server
is
fresno1
and TAF reconnects failed transactions
to the fresno2
instance in case of server failure.
- TYPE=select
- This parameter tells TAF to restart all read-only in-flight transactions
from the beginning of the transaction.
- METHOD=preconnect
- This parameter directs TAF to create two connections when the
transactions start: one to the primary
fresno1
database
and a backup connection to the fresno2
database. If
instance failure, the fresno2
database is ready to
resume the failed transaction.
- RETRIES=20
- This parameter directs TAF to retry a failover connection up to
20 times.
- DELAY=3
- This parameter tells TAF to wait 3 seconds between connection retries.
- Configure Product Master to
use the OCI driver when you are using TAF. See Setting Oracle parameters for setting up
OCI driver.
- After the configuration is complete, you must manually modify the
db_url
property in the db.xml
file. The db_url
property should use the tnsnames.ora
entry with TAF parameters similar to
parameters as shown in the following example:
db_url=jdbc:oracle:oci:@ibm.world