Is it possible to redirect a TNS declaration to another one?
For my current project, I require "flipping" from server to server in certain circumstances. To do this I use 3 TNS entries.
One to hold the TNS name that my application will connect to:
# application access to DB
DB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SAMPLENAME)
)
)
So that I can connect "manually" to either of the databases myself, I use 2 more TNS entries:
# Central_Server "Manual"
Central_Server =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SAMPLENAME)
)
)
# Local "Manual"
Local =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SAMPLENAME)
)
)
Rather than tweaking the TNS entry for DB all the time, is it possible to do something along the lines of?:
DB = Local
or
DB = Central_Server
Due to deployment strategy, I'd rather not implement this logic in my application directly.
Thanks :)