I would like to know, if there is any chance to get the currently used TNS connect string, that will be used for a DB-Link from a db-server.

I'm connected to a schema on a database located on any server. Now, I have some database links, using tnsnames and which are currently not working properly. I would like to check, which target database is behind this identifier to verify easily, if this can be correct.

If I would have OS access to the db-server, I would be able to read the ./tnsnames.ora or using tnsping.

But the DDL of the dblink just uses the TNSNAME (RDBX in this example):


Of course, I could ask a DBA, but this is not always as easy in our environment and I would like to be able to double-check it myself without having OS-access.

  • 2
    Well, like it or not, you are going to have to have OS access of some sort in order to read a file on said OS. The actual error code you receive will give a pretty good clue as to what is wrong, but you still have to open the file in a text editor to fix it. Perhaps you'd be better served in the long run by asking your boss to address the internal political issues that prevent you from working with your DBA.
    – EdStevens
    Oct 28, 2019 at 14:09
  • Thanks, I just wanted to know, if there is a trick I'm not aware of. Oct 28, 2019 at 14:28
  • @Wernfried: Nice idea, but I guess I would get context from my current session, but I know this already, because I use it. But I'm searching for the attributes assigned to this alias RDBX and since I'm unable to use the dblink, I cannot use these commands remotely. Oct 29, 2019 at 21:22

1 Answer 1


I do not think that is possible. Someone or something needs access to the Filesystem to read the tnsnames.ora. When using the DB-link oracle will get the definition for RDBX from the tnsnames.ora file. This is transparent to the user, so the user will not notice. As @EdStevens suggested I would try to solve the political issues and work with the DBA. Or, ask the OS-admin to have a look for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.