Oracle TNS_ADMIN issue

Mindcontrol-Oracle Posts: 1 Green Ribbon

Need your advise on the below:

Recently we migrated to Oracle client 19c from Oracle 11g through script on the windows server.

The script has wiped the previous Environment variable path for oracle 11g and replaced with 19c which is good.

The set up is such that, When I tried to connect to the DB, it first checks the environmental variable and then establishes the DB connection.

Sample Script:
set ora
set tns
tnsping GENPF_dev_connect

The respective output are

"set ora"

Note: This path is correctly set
"set tns"

Note: Not sure from where Oracle took the TNS_ADMIN path.
      TNS_NAMES path is correctly set  
tnsping GENPF_dev_connect

Used parameter files:

The strange part on tnsping is, even after defining and retrieving the right TNS_NAMES, it only checks the path for TNS_ADMIN.

As a work around, I set the TNS_ADMIN with the right path under Environmental variable such as


Even after adding the above entry, Oracle seems to ignore the environment variable path added and always provides the old entry.

Please suggest where things are going wrong on this?