Skip to Main Content

SQLcl

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SQLcl 24.4 uses tnsnames.ora in home directory even when TNS_ADMIN points elsewhere

baataboomApr 10 2025

We have TNS_ADMIN defined as a directory containing tnsnames.ora and a number of 'include files' there. But when we run SQLcl (sql), after considering and finding a match in this TNS data, the process then continues on to find a tnsnames.ora file in the user's home directory. It then finds incorrect information for the same 'database alias' in that file. This causes the process to fail.

I've seen conflicting info re: which db alias match is used when matches are found in multiple 'include files' and/or the primary tnsnames.ora file. But it appears the tnsnames.ora file in in the user's home, which is read last, is taking precedence with sql.

Is the above true and expected? And if so, is there a way to coerce sql to not consider the tnsnames.ora file in a user's home directory?

Comments
Post Details
Added on Apr 10 2025
1 comment
49 views