Visual Studio ODP Unmanaged Driver - Failed to find the default tnsnames.ora file (12c )

oracle.manageddataaccess.client web.config example
oracle managed data access c#
.net framework data provider for oracle
oracle.manageddataaccess.client connection string
odac for visual studio 2019
the type initializer for 'oracleinternal common providerconfig threw an exception
oracle manageddataaccess versions
oracle communication: failed to connect to server or failed to parse connect string

I'm developing an app in Visual Studio 2013 that connects to a Oracle Database. I have to use the "Unmanaged Driver". When I'm trying to create a new connection in a dataset, when I chose the "Managed Driver" all work fine: the tnsnames.ora is found. But when I select the "Unmanaged driver" all fails, it send me a message like " Failed to find the default tnsnames.ora file"

I already - Uninstalled all old Oracle Clients - Clean all environment variables - Reinstalled Oracle client, ODP tools for Visual Studio

Nothing seems to work. Any ideas ?

you should go to the folder containing the machine.config file. this file is found in %windir%\Microsoft.NET\Framework64\[version]\config\machine.config

make sure you have the following value.

<oracle.manageddataaccess.client>
    <version number="4.121.2.0">
      <settings>
        <setting name="TNS_ADMIN"value="E:\app\client\USERWINDOW\product\12.1.0\client_1\network\admin" />
      </settings>
    </version>
</oracle.manageddataaccess.client>

Also, refer to this post on Where Is Machine.Config?

odp.net - Failed to find the default tnsnames.ora file (12c ) -, But when I select the "Unmanaged driver" all fails, it send me a message like " Failed to find the default tnsnames.ora file". I already - Uninstalled all old Oracle� • The "TNS_ADMIN" attribute value indicates a centralized location for ODP.NET, Managed Driver to find the tnsnames.ora file will be provided. • The "value" attribute specifies the path where the tnsnames.ora file is located.

You can ignore that message and simply use EZ Connect to connect (providing host, port, service_name).

Or you can find a valid TNSNAMES.ORA with your aliases in it, and copy it to: [ORACLE_HOME_WHERE_ODT_IS_INSTALLED]\NETWORK\ADMIN

Since Managed Driver can find TNSNAMES.ORA this means that TNS_ADMIN is set in the machine.config. When you connect using managed provider, the connection dialog will show you where it is finding the TNSNAMES.ORA and you can copy it over.

Configuring Oracle Data Provider for .NET, i'm developing app in visual studio 2013 connects oracle database. have use " unmanaged driver". when i'm trying create new connection in� The ODP.NET managed driver reads and caches all the alias entries from the app.config, web.config, machine.config, and from a tnsnames.ora file that is found at application start-up time. However, aliases that are defined in LDAP servers are resolved and cached on demand.

The tnsnames.ora file should be in (installation dir)\network\admin. This is something your dba would provide.

The ORACLE_HOME environment variable is no longer necessary since that information is now found in the registry at HKLM\Software\Oracle.

However, if you have multiple oracle provider installs, it is nice to use the TNS_ADMIN environment variable to point all instances to a centralized folder where a shared tnsnames.ora is located.

Using the Oracle Managed Driver – P3.NET, NET in ODAC 12c Release 2 ODP.NET, Unmanaged Driver supports the configuration of an attribute as follows: 0 : Do not check the status of the connection. Default: 1. DbNotificationPort. Specifies the port number which ODP. data source alias in the tnsnames.ora file present in the same directory as the . exe . Note:. Oracle Data Provider for .NET creates an entry in the machine.config file of the computer on which it is installed, for applications using the OracleClientFactory class. This enables the DbProviderFactories class to recognize ODP.NET. ODP.NET, Unmanaged Driver Entity Framework 6 and Code First functionality are available through a NuGet package.

Please ensure that below entries are present in machine.config so that default tnsnames.ora is correctly pointed to. In my case, entry was missing for unmanaged client and after adding it manually into machine.config, it worked correctly.

machine.config: ..

    <oracle.manageddataaccess.client>
      <version number="4.121.2.0">
       <settings>
        <setting name="TNS_ADMIN" 
        value="C:\app\client\username\product\12.1.0\client_1\network\admin" 
        />
       </settings>
      </version>
    </oracle.manageddataaccess.client>
    <oracle.unmanageddataaccess.client>
     <version number="4.121.2.0">
      <settings>
      <setting name="TNS_ADMIN" 
       value="C:\app\client\username\product\12.1.0\client_1\network\admin" 
      />
      </settings>
     </version>
    </oracle.unmanageddataaccess.client>

..

Visual Studio ODP Unmanaged Driver - Failed to find the , The unmanaged driver can be installed through the standard Oracle client installer. code you have to set up the native connections (e.g. tnsnames.ora). The connection string you use is a pointer to the .ora file. ODP.NET Managed Driver. The managed driver is a 100% managed Double, 12); conn. ODP.NET, Unmanaged Driver requires .NET Framework 3.5 SP 1 or later up to .NET Framework 4.5; Oracle Developer Tools for Visual Studio requires Microsoft Visual Studio 2010 or Visual Studio 2012. Note: Visual Studio Express Editions are not supported with the Oracle Developer Tools. However, ODP.NET is supported with Visual Studio Express Edition.

My solution was: going to the folder "...\product\12.2.0\client_1\odt\vs2017" and manually install the vs2017.exe , and after appeared it in visual studio 2017.

Release Notes ============= Oracle Data Provider for .NET , Visual Studio ODP Unmanaged Driver - Failed to find the default tnsnames.ora file (12c ). 由送分小仙女□ 提交于2019-12-22 05:35:39� ODP.NET, Unmanaged Driver requires .NET Framework 3.5 SP 1 or later up to .NET Framework 4.5.1; Oracle Developer Tools for Visual Studio requires Microsoft Visual Studio 2010, Visual Studio 2012, or Visual Studio 2013 Note: Visual Studio Express Editions are not supported with the Oracle Developer Tools.

An Easy Drive to .NET, NET, Managed Driver for Entity Framework requires Visual Studio 2012 or higher . 3. Open the app/web.config file to configure the ODP.NET connection string and local naming parameters (i.e. tnsnames.ora). Below is an ODP.NET managed and unmanaged drivers set the default session time zone differently. While the� Teams. Q&A for Work. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information.

Visual Studio ODP非托管驱动程序-找不到默认的tnsnames.ora文件, NET, Unmanaged Driver, to “thick” JDBC and ODP. Note that you will also be installing Oracle Developer Tools for Visual Studio By default, the installer will populate these fields with a proposed new Oracle home You can find this information in any TNSNAMES.ORA file you have used to connect to this database. It's probably worth mentioning the only two [version] directories you'll find a machine.config in is v2.0.50727 and v4.0.30319, since v3.0 and v3.5 use the .NET 2.0 CLR and v4.5.x are drop in replacements so don't have their own framework directories.

关于odp.net:Visual Studio ODP非托管驱动程序-未能找到默认的 , Visual Studio ODP非托管驱动程序-找不到默认的tnsnames.ora文件(12c) Visual Studio ODP Unmanaged Driver - Failed to find the default tnsnames.ora file (12c ). 发表于 2015-03-24 13:07:08. 活跃于 2019-11-17 20:26:50. 查看8048 次. Next the driver looks for a TNS_ADMIN setting in one of the config files and caches the entries in any TNSNAMES.ORA file found in the directory that TNS_ADMIN points to. If there is neither a dataSources section nor a TNS_ADMIN setting in a config file, it will load a TNSNAMES.ORA file found in the working directory of the application.

Comments
  • What does your ORA_HOME environment variable look like?
  • It is weird, I checked and I don't have any ORA_HOME environment variable
  • Have you tried setting one?
  • It is not needed (and possibly harmful on Windows to set Ora_Home.
  • Hi tapatio, apologies for bringing this thread up. Did you find any solution? I am stuck with the same problem. Tnsmanes.ora is loaded for managed driver.
  • I had to use the EZ Connect as you said given that I couldn't fix the problem. I had a coworker that for him it work fine but we can't figure out why.
  • I also found this to be the case, that this setting was unfortunately ignored, likely as another config was overriding this.
  • In fact, I already has a tnsnames in the directory you mention but doesn't work anyways.