It appears the environment variable TNS_ADMIN is being used by managed OPD.NET.
- no TNS_ADMIN is defined in app.config
- no TNS_ADMIN is defined in machine.config
- neither of the above config defines the data sources below
- environment variable TNS_ADMIN is set to <Oracle>\network\admin
- <Oracle>\network\admin contains tnsnames.ora that defines DataSource:DsInAdmin
- exe folder contains tnsnames.ora that defines DataSource:DsInExe
If I run an application that uses managed odp.net and try to open a connection to
DsInAdmin : Could not resolve connect identifier
DsInExe : Connection can be opened
If I delete the tnsnames.ora in the exe folder and run the application
DsInAdmin : Connection can be opened
DsInExe : Could not resolve connect identifier
So it appears the environment variable TNS_ADMIN is being honored.
I thought that managed ODP.NET only used:
1. TNS alias in the .NET config files (app/web/machine)
2. TNS alias in the tnsnames.ora at the location specified by 'TNS_ADMIN' in the .NET config files.
3. TNS alias in the tnsnames.ora file present in the same directory as that of the application's working directory
And that env variable TNS_ADMIN was not used.
What am I not understanding about managed ODP.NET and how it finds a tsnames.ora?