Resolving the Server Name from a TNS Service name
A computer client has an Oracle ODBC connection that is attached to a TNS Service Name "X". The TNS Service Name is running in Server "Y".
Does anybody know a quick way to resolve the Server Name "Y" from the TNS Service Name "X" ???
Our current solution is based on opening the file tnsnames.ora, which is normally located in $ORAHOME\network\ADMIN\TNSNAMES.ORA, and by parsing the file resolve the server name. However, we were wondering if there would be a more reliable way to do this. Is there an Oracle API that we can execute? Something like "GetHostName(TNSServiceName)"?
Many Thanks