Skip to Main Content

ODP.NET

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!

Managed ODP.NET and env variable TNS_ADMIN

Daniel LipkieSep 6 2013 — edited Sep 9 2013

  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?

This post has been answered by Alex Keh-Oracle on Sep 6 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 7 2013
Added on Sep 6 2013
3 comments
3,239 views