Can't acces my CentOS/oracle 11g database

Posted May 14, 2017 2.8k views

When I try to connect with TOAD this appears:
TNSADMIN environment variable is not defined
EZCONNECT is not the first naming method in NAMES.DIRECTORY
PATH which may conflict with other naming methods specified.

Plus I do not know what to put on the service name section

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hi @javierruiz
You’re probably better off asking in a Oracle forum, but when I searched a bit, it seems like you’re probably missing the Oracle path from $PATH:

The TNSADMIN environment variable is used to specify the directory location for the tnsnames.ora file. The TNSADMIN environment variable can be defined in the following ways:

For UNIX users, the order in which Oracle searches locations for Oracle Net files like sqlnet.ora and tnsnames.ora are in this order:

  1. $HOME for hidden files only (i.e., .sqlnet.ora and .tnsnames.ora)
  3. $HOME
  4. /etc or /var/opt/oracle (depends on platform)
  5. $ORACLE_HOME/network/admin

Don’t hesitate to contact me if you have any trouble !