Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Resolving the Server Name from a TNS Service name

372494Nov 19 2002
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2002
Added on Nov 19 2002
1 comment
560 views