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:
- Search the Environment Variables and open window.
- In the System variables section click the New button for create new entry.
- 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