TNS_ADMIN Environment variable set in Oracle

TNS_ADMIN value set in Oracle for point one tnsnames.ora file

Use of TNS_ADMIN is defined for tnsnames.ora location when multiple installation of Oracle homes and client are done. TNS_ADMIN environment variable is specify the directory location for the tnsnames.ora file.

If tnsnames.ora is not properly set then it will give the following errors:
ORA-12154: TNS: could not resolve service name or SQL*NET Unable to resolve service name

Set in Environment Variable of Windows:

  1. Search the Environment Variables and open window.
  2. In the System variables section click the New button for create new entry.
  3. Enter a variable name as TNS_ADMIN then enter a variable value of the path to the TNSNAMES.ORA file that will be used as the default.
    For example:
    Name: TNS_ADMIN
    Value: C:\Oracle\dbhomeXE\network\admin

For set at command prompt:

SET TNS_ADMIN=C:\Oracle\dbhomeXE\network\admin

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.