Site icon IT Tutorial

TNS_ADMIN Environment Variable in Oracle

I will explain TNS_ADMIN Environment Variable in Oracle in this post.

 

TNS_ADMIN in Oracle

TNS_ADMIN environment variable is very important in Oracle software that points to the directory where SQL*Net files like tnsnames.ora, sqlnet.ora and listener.ora.

TNS_ADMIN points to the $ORACLE_HOME/network/admin in Linux/Unix and %ORACLE HOME%\network\admin directory in Windows environment.

 

You can set it in Linux as follows.

export TNS_ADMIN=/u01/app/product/12.2.0/dbhome_1/network/admin

 

Or You can set it in Windows as follows.

set TNS_ADMIN=C:\app\oracle\product\12.2.0\dbhome_1\network\admin

 

TNS_ADMIN in Oracle Software Registry for Windows

You should run regedit to open a Registry Editor and then go to following directory.

 

You will find the TNS_ADMIN variable, if not exist or it is incorrect, you can edit it.

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_HOME_NAME

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/

Exit mobile version