I went in TOAD and put in the TNS name for a db that was supplied to me by the DBA. I also put in the user and password and it connected fine. My confusion is that the tnsnames.ora file does not have any entry corresponding to that db name. So how is TOAD resolving the DB name?
Asked
Active
Viewed 2,024 times
0
-
What happens when you go to the TNSNames Editor - does it show it there? – John D Aug 09 '12 at 19:26
-
No man...it shows the empty file:) – Victor Aug 09 '12 at 19:27
-
Hmm then what about in the ODBC Data Source Admin - is there a corresponding entry for the DB under User or System DSN? – John D Aug 09 '12 at 19:29
-
Could be using LDAP to resolve TNS names. Does your oracle client have an ldap.ora file? – hmqcnoesy Aug 09 '12 at 19:31
-
@hmqcnoesy:There is an ldap.ora file but the server name that i am looking for is not listed there – Victor Aug 09 '12 at 19:49
-
The Oracle server name is not listed there? Or the ldap server name is not listed there? The ldap.ora file lists one or more ldap server names, which can be queried to get the oracle instance info for the given TNS name. – hmqcnoesy Aug 09 '12 at 20:10
-
@hmqcnoesy:Can you post it as an answer?I got your point. Thanks – Victor Aug 09 '12 at 20:16
1 Answers
1
In your Oracle client, the ldap.ora file can list one or more ldap server names, which can be queried to get the Oracle instance info for the given TNS name. This way, TOAD (and other apps) can resolve Oracle database names that are not listed in the tnsnames.ora file.

hmqcnoesy
- 4,165
- 3
- 31
- 47
-
Just wondering the obvious: What if the db name i am trying to connect to is present on multiple servers that are listed in ldap.ora? So if ldap.ora has server1,server2,server3....and i am trying to connet to a db called 'testdb' and if 'testdb' exists on all of the servers, then how oracle will resolve it? – Victor Aug 21 '12 at 18:34
-
I noticed once that if you watch some network traffic using procmon, filtered to include toad.exe only, you can see that when you connect to a database with Toad, there is some communication with the first ldap server on the list. If this ldap server has the info needed by the client, any subsequent ldap servers are not queried. I assume (although I haven't tested) that if the first ldap server on the list doesn't have the info, only then will the second one get queried. And so on... – hmqcnoesy Aug 21 '12 at 20:24