Toad World® Forums

Default tnsnames.ora file location config

I prefer to use the oracle net services connection type, but I have to specify the location of the tnsnames.ora on my MAC each time I add a new database connection, is there a way to let toad know automatically where this file is located?

Mine is located in ./Applications/oracle/product/instaclient_64/

and my .bash_profile configures relevant environment variables as:

export ORACLE_HOME=$HOME/Applications/oracle/product/instantclient_64/
export PATH=/usr/local/bin/athena:$ORACLE_HOME/bin:$PATH

TNS_ADMIN is env variable that points to directory exctly for your need.

so set:

export TNS_ADMIN=./Applications/oracle/product/instaclient_64/



Hi Damir, thank you for the reply, still not working unfortunately :frowning:

The problem might be that the path you specified above is a “relative” path, in that it starts with a “.” (period). Try setting TNS_ADMIN with an exact specified path to the directory.

For example, this is mine:

export TNS_ADMIN=/homes/oracle/common_files



Thanks Mike, I did try both relative and specific paths in various combinations before responding to your post, I did not have any luck :frowning:

show me copy/paste whole content of execution … something like command prompt, shell:

tnsping xxx

where xxx is your desired db description (from tnsnames.ora file).

show us content of sqlnet.ora file - hope it is in same dir as pointed tns_admin variable