Forum Stats

  • 3,872,586 Users
  • 2,266,452 Discussions
  • 7,911,259 Comments

Discussions

connection behaviour difference between 19.4 / 21.2 when using tnsnames entry with domain suffix

Jacques R. Kilchoer
Jacques R. Kilchoer Member Posts: 14 Blue Ribbon

Windows 10 ; Oracle Home points to an Oracle 19.3 home

My tnsnames.ora file has several db aliases with different domain suffixes, e.g. db1.x.info and also db1.y.com

In SQLcl 19.4 I can connect using "connect [email protected]" or "connect [email protected]".

In SQLcl 21.2 I have to remove the domain suffix to connect; "connect [email protected]" succeeds but "connect [email protected]" fails. In the same way, "connect [email protected]" works but "connect [email protected]" fails.

Since I see the same behaviour for "db1.x.info" and "db2.y.com" the error shouldn't be the default_domain in sqlnet.ora. In any case I don't have a default_domain entry in the sqlnet.ora file.


<-------------------------> what happens with sqlcl 19.4

C:\Users\Firstname Lastname\Applications\sqlcl 19.4\bin>sql.exe /nolog

WARNING: An illegal reflective access operation has occurred

WARNING: Illegal reflective access by oracle.dbtools.raptor.utils.WindowsUtility (file:/C:/Users/Firstname%20Lastname/Applications/sqlcl%2019.4/lib/dbtools-common.jar) to method java.util.prefs.WindowsPreferences.WindowsRegOpenKey(long,byte[],int)

WARNING: Please consider reporting this to the maintainers of oracle.dbtools.raptor.utils.WindowsUtility

WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations

WARNING: All illegal access operations will be denied in a future release


SQLcl : version 19.4 Production sur ven. juil. 02 17:44:10 2021

Copyright (c) 1982, 2021, Oracle. Tous droits rΘservΘs.

SQL> show tns

TNS Lookup locations

--------------------

1. USER Home dir

  C:\Users\Firstname Lastname

2. ORACLE_HOME

  C:\app\oracle\ora19\home1\network\admin

Location used:

-------------

    C:\app\oracle\ora19\home1\network\admin

Available TNS Entries

---------------------

db1.x.info

db2.y.com

SQL> connect [email protected]

Mot de passe ? (**********?) ********

ConnectΘ.

SQL> connect [email protected]

Mot de passe ? (**********?) ********

ConnectΘ.



<-------------------------> what happens with sqlcl 21.2


C:\Users\Firstname Lastname\Applications\sqlcl\bin>sql.exe /nolog

SQLcl : version 21.2 Production sur ven. juil. 02 17:45:34 2021

Copyright (c) 1982, 2021, Oracle. Tous droits rΘservΘs.

SQL> show tns

TNS Lookup Locations

--------------------

1. USER Home dir

    C:\Users\Firstname Lastname

2. ORACLE_HOME

    C:\app\oracle\ora19\home1\network\admin

TNS Location Used

-----------------

1. C:\app\oracle\ora19\home1\network\admin

Available TNS Entries

---------------------

db1.x.info

db2.y.com

SQL> connect [email protected]

Mot de passe ? (**********?) ********

 USER     = username

 URL      = jdbc:oracle:oci8:@db1.x.info

 Message d'erreur = no ocijdbc21 in java.library.path: C:\Program Files\Java\jdk-15\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Microsoft MPI\Bin\;C:\Program Files\Common Files\Oracle\Java\javapath;C:\app\oracle\ora19\home1\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Google\Google Apps Sync\;C:\Program Files\Google\Google Apps Migration\;C:\Program Files\PuTTY\;C:\Program Files\MongoDB\Server\4.2\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Program Files\ibm\gsk8\lib64;C:\Program Files (x86)\ibm\gsk8\lib;C:\PROGRA~1\IBM\SQLLIB_01\BIN;C:\PROGRA~1\IBM\SQLLIB_01\FUNCTION;C:\PROGRA~1\IBM\SQLLIB_01\SAMPLES\REPL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\Firstname Lastname\AppData\Local\Microsoft\WindowsApps;C:\Users\Firstname Lastname\AppData\Local\GitHubDesktop\bin;C:\Users\Firstname Lastname\AppData\Local\Microsoft\WindowsApps;C:\Users\Firstname Lastname\.dotnet\tools;C:\Program Files\Java\jdk-15\bin;.

 USER     = username

 URL      = jdbc:oracle:thin:@db1.x.info

 Message d'erreur = Erreur d'E/S: Unknown host specified (CONNECTION_ID=JUuT4l+FTJyAQCp3BB00lg==)

SQL> connect [email protected]

Mot de passe ? (**********?) ********

ConnectΘ.

(success; show connection shows the expected tns information for db1.x.info)

SQL> connect [email protected]

(same error as when connecting to db1.x.info)

SQL> connect [email protected]

(success; show connection shows the expected tns information for db2.y.com)

Answers