c .net oracle,.NET安装和配置Oracle数据访问组件(ODAC)

http://www.cnblogs.com/jmax/p/3151944.html

Many ASP.NET applications access Oracle database for the data source. Oracle supports the .NET with its Oracle Data Access Components (ODAC). By using ODAC, you do not have to install a heavy Oracle client in the Windows server machines which have IIS for the ASP.NET applications.

ODAC includes Oracle Instant Client, Oracle Providers for ASP.NET, and Oracle Data Provider for .NET. Oracle Instant Client is necessary since it has Oracle’s database APIs - OCI libraries for an Oracle database client in Windows systems to connect Oracle database server. Oracle Providers for ASP.NET, and Oracle Data Provider for .NET. are required to install if you are using Oracle providers in your ASP.NET or .NET applications.

If you using the .NET Framework Data Provider for Oracle which is in the System.Data.OracleClient namespace (The assembly System.Data.OracleClient.dll included in the .NET frameworks), you do not need to install Oracle Providers for ASP.NET, or Oracle Data Provider for .NET. For more information about System.Data.OracleClient namespace, see Oracle and ADO.NET on MSDN.

Let’s start the installation and configuration.

1. Download the latest version ODAC112030Xcopy_32bit.zip orODAC112030Xcopy_x64.zip zip file from Oracle web site and unzip the .zip file in a local folder in Windows.

For 32-bit: C:\temp\ODAC112030Xcopy_32bit

For 64-bit: C:\temp\ODAC112030Xcopy_x64

2. You can install either 32-bit ODAC or 64-bit ODAC, or both. Open a Command Prompt with the Administrator privilege, go to the folder above, type and run the installation script:

For 32-bit:

C:\temp\ODAC112030Xcopy_32bit>install.bat basic c:\oracle\odac32 odac32 false

For 64-bit:

C:\temp\ODAC112030Xcopy_x64>install.bat basic c:\oracle\odac odac false

This will install the Oracle Instant Client into the folder c:\oracle\odac32 orc:\oracle\odac. Notice “Oracle Home Name” in the installation script parameters:odac32(for 32bit) or odac(for x64). Oracle Home Name has to be different if you want to install both 32-bit and 64-bit ODAC.

3. This step is to install Oracle providers. If you only use the .NET Framework Data Provider for Oracle, you can skip this step.

To install ODP, in the same Command Prompt, type and run installation script:

For 32-bit Oracle Data Provider for .NET 4:

C:\temp\ODAC112030Xcopy_32bit>install.bat odp.net4 c:\oracle\odac32 odac32 false

For 64-bit Oracle Data Provider for .NET 4:

C:\temp\ODAC112030Xcopy_x64>>install.bat odp.net4 c:\oracle\odac odac false

To install ASP.NET Provider, in the same Command Prompt, type and run installation script:

For 32-bit Oracle Provider for ASP.NET 4:

C:\temp\ODAC112030Xcopy_32bit>>install.bat asp.net4 c:\oracle\odac32 odac32 false

For 64-bit Oracle Provider for ASP.NET 4:

C:\temp\ODAC112030Xcopy_x64>>install.bat asp.net4 c:\oracle\odac odac false

4. Setup PATH System Environment Variable for IIS Windows web server. Since ODAC communicates Oracle database through OCI in the Oracle Instant Client, and OCI libraries are the native Windows librarys, you have to tell IIS where to load those libraries. Add the path of c:\oracle\odac32 or c:\oracle\odac into the PATH System Environment Variable.

After set PATH System Environment Variable, reboot machine to make the System Environment Variable effective.

转载于:https://www.cnblogs.com/jmax/p/3151944.html

标签:ODAC,install,Provider,Oracle,NET,Data,bit

来源: https://blog.csdn.net/weixin_30262255/article/details/99222593

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值