With Oracle.ManagedDataAccess.dll
12
and 18
, if you want to use tnsname.ora
aliases, then you have to define the Environment Variable TNS_ADMIN
with the corresponding path.
I just discovered that the version 19
is able to get the tnsname.ora
configuration without this Environment Variable but I'm not sure how?
Neither the web.cong
nor the machine.config
contains that Environment Variable.
There seems to be a path in Registry Editor but my project still works when I modify the path with erroneous one.
From what I have tested, here is a list of what works and what doesn't :
- Local client
19.3
with Oracle.ManagedDataAccess19.3
(and superior) : Works withoutTNS_ADMIN
Env - Local client
19.3
with Oracle.ManagedDataAccess18.6
(and prior) : Doesn't work withoutTNS_ADMIN
Env - Local client
12.1
with Oracle.ManagedDataAccess (all versions) : Doesn't work withoutTNS_ADMIN
Env
So i'm wondering why does this particular case work?
Also is there a method inside Oracle.ManagedDataAccess that return the used tnsname.ora
path?
Thanks,
Thanks all for your answers.
I finally found the solution using Process Monitor (thx @WernfriedDomscheit) and filtering the
Path
column withTNS_ADMIN
.There are two paths in the Registry Editor that contain the
TNS_ADMIN
variable:I was only trying to remove the non-
WOW6432Node
path. If I also remove theWOW6432Node
one, thenOracle.ManagedDataAccess.dll
successfully fail.