I've been trying to switch from the Oracle OCI driver to the thin driver, I got the thin driver to pickup my tnsnames.ora
by adding -Doracle.net.tns_admin=/path
to the command line.
However, our tnsnames.ora
contains lines where multiple services are defined at once. They look like this:
NEWS2,NEWS,NEWSFX = (DESCRIPTION_LIST=...)
The OCI driver seems happy with this format, but the thin driver doesn't understand that those are 3 separate services NEWS2
, NEWS
and NEWSFX
. Some painful debugging sessions have revealed that it thinks this is a single service named NEWS2,NEWS,NEWSFX
.
Our DBA's are understandably not very keen on copy-pasting service descriptors left and right, and insist that we find a way to be able to declare different names for the same service descriptor without copy paste before switching from OCI to thin.
Is there a properly supported way to achieve this with the oracle thin driver?
PS: here's a post from a guy who is using that same feature, and also mentions that it is apparently undocumented: https://dbamarco.wordpress.com/2015/12/02/tnsnames-ora-secrets/