data guard: TAF on physical standby
715050Sep 23 2011 — edited Sep 26 2011I am trying to make the connection time fail over working for a oracle 11.1 physical standby working, here is what I did:
1. changed client tnsname to use a 'myapp' service
2. registered and start the 'myapp' service
3. create a trigger on the primary to start the service on the primary
4. test fail over or switch over the database to the standby
what I found is that I have to use myapp.primhost in the client tnsnames.ora in order to connect to the primary database, could somebody tell me how I can make the service name not depend on the hostname? for example, I like the tnsname look like, I am not sure somewhere the domain name is bundled with service name, v$parameter shows 'myapp' as the service name though.
myapp =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = primdb)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = stddb)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = myapp)
)
)
instead of
myapp =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = primdb)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = stddb)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = myapp.primdb)
)
)
Could somebody give me a hint on this?
Thanks in advance.
Linda