ODP.NET 是否需要安装 Oracle 客户端 [英] Does ODP.NET require Oracle Client installation

查看:23
本文介绍了ODP.NET 是否需要安装 Oracle 客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须从 .NET 代码连接 Oracle 11g DB.为此,我在阅读了一些论坛帖子后安装了 ODP.NET bur,我意识到我也需要安装 Oracle Client.

I have to connect Oracle 11g DB from .NET code. For that purpose I installed ODP.NET bur after reading some forum posts I recognized that I need Oracle Client installation too.

这是真的吗?我看到 Oracle Client 的大小为 ca.2GB!!!我真的需要安装这么大的客户端才能连接 Oracle DB 吗?

Is that true? I see that the Oracle Client has a size of ca. 2GB!!! Do I really need to install such a huge client only to be able to connect Oracle DBs?

推荐答案

2013 年 8 月来自 Oracle 的 Alex Keh 说:

Alex Keh from Oracle in aug 2013 says:

托管 ODP.NET 发布.它目前是 Oracle DB 12c 的一部分客户.要使用托管 ODP.NET,您必须下载并安装数据库客户端.从那里,您可以只提取托管的 ODP.NET组装和设置文件.这些文件小于 10 MB,可以部署到任何目标机器.

Managed ODP.NET is released. It is currently part of the Oracle DB 12c client. To use managed ODP.NET, you have to download and install the DB client. From there, you can extract just the managed ODP.NET assembly and setup files. These files are less than 10 MB and can be deployed to any target machines.

目前,我们正在打包一个独立的托管 ODP.NET 版本和ODAC 12 版本会小得多.这将在OTN 很快.

Currently, we are packaging a stand alone managed ODP.NET release and ODAC 12 release that will be much smaller. This will be released on OTN shortly.

如果您能等几天,ODAC 12c 将在 OTN 上发布,您可以下载该版本.那将是我们最新和最伟大的托管 ODP.NET 版本

====

我们不打算将托管的 ODP.NET 放在 NuGet 上.我们相信,使用 ODAC 托管 ODP.NET 下载将提供相同的好处NuGet 在程序集隔离和下载大小方面.

We do not plan to put managed ODP.NET on NuGet. We believe that the managed ODP.NET download with ODAC will provide the same benefits of NuGet in terms of assembly isolation and download size.

有一个线程讨论 Oracle 是否应该提供托管ODP.NET NuGet 支持.使用 ODAC 12c 后,我想知道您对是否仍然需要 NuGet 支持的看法.https://forums.oracle.com/thread/2559445

There's a thread discussing whether Oracle should provide managed ODP.NET NuGet support. Once you use ODAC 12c, I would like to know your thoughts on whether NuGet support is still necessary. https://forums.oracle.com/thread/2559445

Nuget 管理的 ODP.NET:

PM> Install-Package Oracle.ManagedDataAccess

那到底是什么问题?
到目前为止,ODP.NET 基本上是一个与 Oracle 客户端 .dll 文件通信的 .NET 层,一个有很多含义的小事实:

So what is the problem anyway?
Basically up until now, ODP.NET was a .NET layer that talks to the Oracle client .dll files, a small fact that had many implications:

  • 安装占用空间大(数百 Mb)
  • 难以部署到远程机器 - 需要在客户端安装 ODP.NET机器或部署大文件
  • 在使用多个版本、32 位/64 位操作系统和应用程序时具有挑战性

那是什么?

托管驱动程序基本上是单个 .dll 文件,其中包含 ODP.NET 的 .Net 本机实现.
这意味着不需要 Oracle 客户端,现在本地代码在幕后.XCopy 安装可以轻松完成.

The managed driver is basically a single .dll file with a .Net native implementation of ODP.NET.
That means no Oracle Client is needed, and now native code is behind the scenes. XCopy installation can be done easily.

主要优势:

  • 占地面积小
  • 编译为任何 CPU,因此它可以在 32 位/64 位操作系统上运行并顺利申请.易于管理多个版本同一台机器
  • 可以在应用中作为简单的参考部署bin 目录.

那么有什么收获?

  • 并非所有功能都受支持(尽管其中大部分是...)可以在文档
  • 上找到更多信息
  • 命名空间从Oracle.DataAccess.Client 到 Oracle.ManagedDataAccess.Client
  • 性能差异仍不明确.(旧)本机代码总是非常有效地执行,但另一方面 100% 管理代码具有性能优势.

请注意,本机代码 ODP.NET 仍然非常可用.托管版本(至少现在是)是本机版本的补充.

Please note that the Native-Code ODP.NET is still very much available. The managed version (at least for now) comes in addition to the native one.

参考:http://oracleatdotnet.blogspot.com.es/2013/07/odpnet-managed-driver-beta-2.html

ODP.NET 托管驱动程序和非托管驱动程序之间的区别http://docs.oracle.com/html/E41125_02/intro004.htm

Oracle Data Provider for .NET 的特性http://docs.oracle.com/database/121/ODPNT/features.htm#ODPNT0007

这篇关于ODP.NET 是否需要安装 Oracle 客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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