Question : Automatic Failover from RAC to DTG on the Clientside

Hello,

we have a 2 node 10.2.0.3 RAC cluster with an attached data guard on Redhat 5.2.
If the RAC is breaking down because of an error we have a manual switch/failover procedure to promote the secondary DB (data guard) to the primary DB.
On the client side we have a central saved tnsnames.ora which will be accessed by 50 PCs.

Our application which is running on those PCs has a build-in drop down box which is normally using the FCRAC connection. In a case of an failover they have to select the DTG entry which has to be communicated.

Is there a possibility to have a kind of failover to DTG parameter in this tnsnames.ora or something similar to that?

Greetings,
Andi
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
tnsnames.ora Node1/Node2/DTG: 
 
FUX =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ulficlusvip11)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = ulficlusvip12)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = fux.luna.xdomain.de)
)
)
LISTENERS_FUX =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ulficlusvip11)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = ulficlusvip12)(PORT = 1521))
)
FCRAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ulficlusvip11)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = ulficlusvip12)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = fcrac.luna.xdomain.de)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
FUX2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ulficlusvip12)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = fux.luna.xdomain.de)
(INSTANCE_NAME = fux2)
)
)
 
fux1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ulficlusvip11)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = fux.luna.xdomain.de)
(INSTANCE_NAME = fux1)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
DTG =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.83.128.17)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dtg.luna.xdomain.de)
)
)
Open in New Window Select All

Answer : Automatic Failover from RAC to DTG on the Clientside

You can use from DTG a stored procedure that using the package
UTL_FILE will read, find the rows and change them in the file TNSNAME.ORA
This can be done using the ideas here:

http://www.oracle.com/technology/pub/articles/smiley-fsfo.html

It proposes to keep 2 variants of TNSNAMES.ORA.
So using UTIL_FILE it is possible to change the working tnsname.ora on the fly.
Random Solutions  
 
programming4us programming4us