Oracle Client and ODP.NET version compatibility

两盒软妹~` 提交于 2021-02-11 15:23:52

问题


We have upgraded Oracle to 19C and also upgraded the Oracle.ManagedDataAccess package to 19.6. However, when we try to open our application on Oracle database 12 then it is showing error, as some machines still has Oracle 12 (Old) database. can someone please share the Oracle Data Provider (ODP.Net) compatibility details with Oracle Clients?


回答1:


The error message does not indicate any incompatibility. Looks like the Oracle.ManagedDataAccess driver does not find your tnsnames.ora file

Have a look at Oracle Data Provider for .NET, Managed Driver Configuration

  • Did you define a TNS_ADMIN environment variable?

  • Did you define TNS_ADMIN in your Registry at HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\OraClient19Home1 resp. HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Oracle\OraClient19Home1_32bit?

    Documentation states that Registry is not read but for verion 19 I am not sure about that

  • Did you define the TNS_ADMIN in .NET config file?

    The easiest way to set it there would be the OraProvCfg.exe tool. Would be similar to this:

For 64-bit:

c:\oracle\product\12.1\Client_x64\ODP.NET\bin\4\OraProvCfg.exe /action:config /product:odpm /frameworkversion:v4.0.30319 /providerpath:C:\oracle\product\12.1\Client_x64\odp.net\managed\common\Oracle.ManagedDataAccess.dll /set:settings\TNS_ADMIN:C:\oracle\network\admin 

For 32-bit:

c:\oracle\product\12.1\Client_x86\ODP.NET\bin\4\OraProvCfg.exe /action:config /product:odpm /frameworkversion:v4.0.30319 /providerpath:C:\oracle\product\12.1\Client_x86\odp.net\managed\common\Oracle.ManagedDataAccess.dll /set:settings\TNS_ADMIN:C:\oracle\network\admin 


来源:https://stackoverflow.com/questions/60052285/oracle-client-and-odp-net-version-compatibility

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!