Oracle Odp.net Driver Deploy

醉酒当歌 提交于 2019-12-11 19:00:00

问题


We have installed the 32bit odp.net driver for Oracle. Our server currently hosts applications that are using the deprecated Microsoft Oracle driver.

To use the new odp.net driver on the server will there be any conflicts with the older deprecated driver from microsoft?

What needs to be installed on the server? (how to avoid conflicts with existing web applications?)


回答1:


System.Data.OracleClient relies on the unmanaged Oracle client software in the same way that odp.net does:

http://msdn.microsoft.com/en-us/library/2d7h4ycx.aspx

The .NET Framework Data Provider for Oracle provides access to an Oracle database using the Oracle Call Interface (OCI) as provided by Oracle Client software. The functionality of the data provider is designed to be similar to that of the .NET Framework data providers for SQL Server, OLE DB, and ODBC.

When the Oracle client is installed it establishes a "oracle_home" (multiple oracle homes are alowed) and uses various methods to find related dependencies including the registry (HKLM/Software/Oracle), .config options, and the path statement. I'm not exactly sure which method System.Data.OracleClient uses, but I would guess it relies on the path environment variable as do older versions of the client.

Installing a new client will likely put itself first in the path statement. For example consider the following snip from the command line "set" command with my 4 clients installed:

OS=Windows_NT Path=C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Oracle \product\11.2.0\client_ODT;C:\Oracle\product\11.2.0\client_ODT\bin;C:\Oracle\product\11.2.0\client_ODACx64;C:\Oracle\product\11.2.0\client_O DACx64\bin;C:\Oracle\product\11.2.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShe ll\v1.0\;C:\ORA6i\bin;C:\ORANT\bin;C:\Windows\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\ORA6i\jdk\bin;C:\Windows\system32;C:\WINDOWS;C :\WINDOWS\System32\Wbem;C:\ORA6i\jdk\bin;C:\ORA6i\bin;C:\ORANT\bin;C:\Windows\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\ORA6i\jdk\bin;

At that point it's possible, and likely, that existing client users will begin to use your newly installed client instead. So you may want to check your system before and after install for these kind of changes.

Running under the new client will probably be fine, but if you're looking to avoid touching existing systems. Consider using the xcopy install instead. Below are some links for information on installing it: http://www.oracle.com/technetwork/issue-archive/2008/08-nov/o68odpnet-101744.html http://www.brothersincode.com/post/Oracle-ODPnet-xcopy-deployment-for-aspnet.aspx

The xcopy install doesn't add itself to the path statement so it shouldn't affect your other installations. New versions of odp.net are supposed to resolve unmanaged binaries thru the registry, so your new app may find it without issue. However, I find dllPath config more reliable - the following would go in your config file:

<configuration>
  <oracle.dataaccess.client> 
    <add key="DllPath" value="c:\oracle\product\1.1.0-xcopy-dep\BIN"/>
  </oracle.dataaccess.client>
</configuration>



回答2:


As I know there are no conflicts. And it will be better for Oracle - progress of development is bigger than in the MS solution. You can read all about installation process and requirements here -> Oracle® Data Provider for .NET



来源:https://stackoverflow.com/questions/14638552/oracle-odp-net-driver-deploy

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