Oracle Odp.net驱动程序部署 [英] Oracle Odp.net Driver Deploy

查看:272
本文介绍了Oracle Odp.net驱动程序部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经为Oracle安装了32位odp.net驱动程序.我们的服务器当前托管使用不推荐使用的Microsoft Oracle驱动程序的应用程序.

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

要在服务器上使用新的odp.net驱动程序,是否与Microsoft弃用的旧驱动程序有任何冲突?

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

服务器上需要安装什么? (如何避免与现有的Web应用程序冲突?)

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

推荐答案

System.Data.OracleClient依赖于不受管理的Oracle客户端软件,其方式与odp.net相同:

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

Oracle的.NET Framework数据提供程序提供对以下项的访问: 由Oracle提供的使用Oracle Call Interface(OCI)的Oracle数据库 Oracle客户端软件.数据提供者的功能是 设计为与.NET Framework数据提供程序相似 用于SQL Server,OLE DB和ODBC.

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.

在安装Oracle客户端时,它将建立一个"oracle_home"(允许多个Oracle主目录),并使用各种方法来查找相关的依赖项,包括注册表(HKLM/Software/Oracle)、. config选项和path语句.我不能完全确定System.Data.OracleClient使用哪种方法,但是我猜想它与客户端的旧版本一样都依赖于路径环境变量.

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.

安装新客户端可能会将自己放在path语句中的第一位.例如,考虑在安装了4个客户端的命令行"set"命令中的以下片段:

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路径= C:\ Program Files \ Common Files \ Microsoft 共享\ Windows Live; C:\ Program Files(x86)\ Common Files \ Microsoft 共享\ 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;

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.

在新客户端下运行可能会很好,但是如果您希望避免接触现有系统.考虑改用 xcopy install .以下是一些有关安装它的信息的链接: 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

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

xcopy安装不会将自身添加到path语句中,因此它不会影响您的其他安装. odp.net的新版本应该可以通过注册表来解析非托管二进制文件,因此您的新应用程序可能会找到它,而不会出现问题.但是,我发现dllPath配置更可靠-以下内容会放入您的配置文件中:

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>

这篇关于Oracle Odp.net驱动程序部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆