Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResolveRootTnsNamesFiles does not work with some of ManagedDriver conventions. #2

Open
salixzs opened this issue Apr 24, 2017 · 1 comment

Comments

@salixzs
Copy link

salixzs commented Apr 24, 2017

This is more problem with Oracle approaches, but for Manged Driver they use different approach on where driver finds tnsnames.ora file:
http://stackoverflow.com/questions/28280883/determining-locatation-of-relevant-tnsnames-ora-file

For example, for ODP.NET Managed Driver (Oracle.ManagedDataAccess) beta version, I found this order at Oracle Managed and TNS Names :

  • data source alias in the 'dataSources' section under <oracle.manageddataaccess.client> section in the .NET config file (i.e. machine.config, web.config, user.config).
  • data source alias in the tnsnames.ora file at the location specified by TNS_ADMIN in the .NET config file.
  • data source alias in the tnsnames.ora file present in the same directory as the .exe.
  • data source alias in the tnsnames.ora file present at %TNS_ADMIN% (where %TNS_ADMIN% is an environment variable setting).
  • data source alias in the tnsnames.ora file present at %ORACLE_HOME%\network\admin (where %ORACLE_HOME% is an environment variable setting).

First three options are not covered by ResolveRootTnsNamesFiles().
Also I do not see how it is possible to get these settings because of if you read this section <oracle.manageddataaccess.client> through full framework System.Configuration.ConfigurationManager.GetSection() method - you get nothing usable.

@espenrl
Copy link
Owner

espenrl commented May 8, 2017

Thanks for the feedback. ResolveRootTnsNamesFiles is designed around the native oracle client and does not cover all cases (like the third). It does however resolve installations of the native oracle client which is the original use case for this repository. Feel free to expand the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants