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
Unknown's avatar

Author: SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply

Discover more from SmartTechWays - Innovative Solutions for Smart Businesses

Subscribe now to keep reading and get access to the full archive.

Continue reading