Wrong tnsname.ora used in Define Connections dialog

I have Instantclient and Oracle XE 18 installed on my local machine.

Oracle Home and OCI library are configured to use c:\apps\oracle\instantclient_19_6 (see attachment)

But when I want to add new connections the entries of the Oracle XE 18 tnsnames.ora are displayed. (see attachment)

It seems that in the Define Connections Dialog the configured Oracle Home is not considered.

When I enter manually a name the connection works. So it really takes the configured oracle home to connect.

In the Support Info Dialog I also see the wrong ORACLE_HOME:

Homes
OraDB18Home1 (C:\apps\oracle\xe18\dbhomeXE)

DLLs
C:\apps\oracle\xe18\dbhomeXE\bin\oci.dll

TNS File
C:\apps\oracle\xe18\dbhomeXE\Network\Admin\tnsnames.ora

Using
Home: c:\apps\oracle\instantclient_19_6
DLL: c:\apps\oracle\instantclient_19_6\oci.dll
OCI: version 12.1 (19.6.0.0.0)
Oracle Database 12c Standard Edition Release 12.2.0.1.0


Screenshot 2021-01-09 184747.png preferences.png
 
Last edited:
The location of the tnsnames.ora file is determined as follows:

  • The TNS_ADMIN environment variable
  • The TNS_ADMIN entry in the registry of the selected Oracle Home
  • The network\admin directory of the selected Oracle Home

For your instant client you will need to set the TNS_ADMIN environment variable.
 
1 and 2 is not set but for three this is not working

In the support info dialog I see:

Using
Home: c:\apps\oracle\instantclient_19_6

So I assume that tnsnames.ora would be selected from c:\apps\oracle\instantclient_19_6\network\admin

But that's not the case
 
The Oracle Home should be the Oracle Home name, as defined in the Oracle Registry. For an Instant Client this does not apply. Only option 1, the TNS_ADMIN environment variable, can be used for the Instant Client.
 
Back
Top