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?