How to configure Oracle client to automatically lookup connection strings via LDAP/OID?

Solution 1:

you also need to setup the TNS_ADMIN variable to point to the folder where your files are.

example :

export TNS_ADMIN=$ORACLE_HOME/ldap/admin

(it might point somewhere else by default,or depending on your environment variables, perhaps at a place with empty files). also, check your files permissions, your client need to be able to read these files (644).

and you also need to ensure that you are using the right SID for your database. do you have the NAMES.DEFAULT_DOMAIN variable setup in your sqlnet.ora file ? try appending .world to your SID in your command, such as :

sqlplus login/[email protected]

and/or add this line in your sqlnet.ora too :

NAMES.DEFAULT_DOMAIN = WORLD

also, you need to check a couple of other things, is your database "registered" correctly in OID ? (it's usually done with dbca)

another thing : when you browse to OID, what do you see under "cn=OracleContext,dc=example,dc=com" ? you should have an entry with your database sid (cn=DB_SID,cn=OracleContext,dc=example,dc=com). in this entry (if it exists), you should have an "orclnetdescstring" containing your database information (host, port & SID, the real tns in fact), is this information correct ? your problem probably comes from there (wrong description string in the database entry you are trying to contact, or database not registered correctly in OID) ..

there are numerous of other checks that you need to do, let me know if the above fix your problems, ty