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!

Bug: network path resolving for .NET Core drivers is broken

Yves_DJun 21 2019 — edited Oct 10 2019

Hello,

As I didn't find an official way to report a bug in the Oracle Data Provider for .NET Core, I will try through this forum.

We are using the TNS_ADMIN environment variable on our development systems and let it point to a share \\share\oracle . When trying to connect to a database, we are getting the famous "Unable to resolve ORA-12154: TNS:could not resolve the connect identifier specified". Turning on tracing, we discovered that the driver is looking for the tnsnames.ora in c:\share\oracle .

Decompiling the driver and checking the code learned us that at some point in the OracleInternal.Common.ConfigBaseClass.GetResolvedFileLocation the path stored in the TNS_ADMIN is split in its different parts based on the directory separator, thereby ignoring empty entries. Later on, in OracleInternal.Common.ConfigBaseClass.ResolveEnvVariables the entire thing is reassembled again, but of course incorrectly since information was lost during the path split.

So, in our case \\share\oracle became ['share', 'oracle'] which became 'share\oracle' and thus resolved to c:\share\oracle . And of course, that path didn't exist.

This post has been answered by Alex Keh-Oracle on Jun 25 2019
Jump to Answer
Comments
Post Details
Added on Jun 21 2019
8 comments
3,938 views