如何为 .Net 应用程序选择 Oracle 提供商?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/682773/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 17:59:00  来源:igfitidea点击:

How to choose an Oracle provider for .Net application?

c#oracleasp.net-2.0provider

提问by devio

I am trying to figure out what is the best way to connect an (existing) ASP.Net application to an Oracle database to read its dictionary information.

我试图找出将(现有)ASP.Net 应用程序连接到 Oracle 数据库以读取其字典信息的最佳方法是什么。

There are simply too many possibilities:

有太多的可能性:

  • MS Data Provider for Oracle (requires 8.1.7, namespace System.Data.OracleClient)
  • Oracle Data Provider for .NET (requires 9.2, namespace Oracle.DataAccess)
  • Oracle Provider for OLE DB
  • MSDASQL and ODBC
  • MS Data Provider for Oracle(需要 8.1.7,命名空间 System.Data.OracleClient)
  • 适用于 .NET 的 Oracle 数据提供程序(需要 9.2,命名空间 Oracle.DataAccess)
  • OLE DB 的 Oracle 提供程序
  • MSDASQL 和 ODBC

As my current app uses MSSQL server, further options would be:

由于我当前的应用程序使用 MSSQL 服务器,因此进一步的选择是:

  • Linked Server, access via server..user.object
  • Linked Server via OPENROWSET
  • 链接服务器,通过 server..user.object 访问
  • 通过 OPENROWSET 链接服务器

There are a couple of questions on similar topics on SO, but only some have accepted answers.

在 SO 上有几个关于类似主题的问题,但只有一些已经接受了答案。

What's your experience with each of the drivers? What are their pros and cons?

您对每位司机的体验如何?它们的优缺点是什么?

Of course Oracle is recommending ODP.Net. Is the requirement of version 9.2 (or higher) a problem today?

当然,Oracle 推荐的是 ODP.Net。今天对 9.2(或更高版本)的要求是一个问题吗?

采纳答案by tuinstoel

I too recommend ODP.NET. Choose the latest provider (http://www.oracle.com/technology/tech/windows/odpnet/index.html). It can connect with an Oracle 9.2 database or a newer release of the database.

我也推荐 ODP.NET。选择最新的提供商 ( http://www.oracle.com/technology/tech/windows/odpnet/index.html)。它可以连接 Oracle 9.2 数据库或更新版本的数据库。

The MS Data Provider for Oracle is very limited. You can't work with arrays for example and user defined types. And why would Microsoft provide good support for connecting to Oracle?

适用于 Oracle 的 MS 数据提供程序非常有限。例如,您不能使用数组和用户定义的类型。为什么 Microsoft 会为连接到 Oracle 提供良好的支持?

You can also check out the provider of devart: http://www.devart.com/dotconnect/oracle/. It supports the entity framework.

您还可以查看 devart 的提供者:http: //www.devart.com/dotconnect/oracle/。它支持实体框架。

回答by Konstantin Tarkus

Dump OLE DB and ODBC options, if you have direct data access provider there is no need in using OLE DB or ODBC.

转储 OLE DB 和 ODBC 选项,如果您有直接数据访问提供程序,则无需使用 OLE DB 或 ODBC。

I recommend Oracle Data Provider for .NET.

我推荐 Oracle Data Provider for .NET。

回答by Konstantin Tarkus

Microsoft just announced it is deprecating System.Data.OracleClient.

微软刚刚宣布它正在弃用 System.Data.OracleClient

I think that leaves you with a few choices (at least):

我认为这给你留下了几个选择(至少):

  • ODP.NET (free, from Oracle)
  • DevArt
  • DataDirect
  • ODP.NET(免费,来自 Oracle)
  • 开发艺术
  • 数据直连

DevArt also has a LINQ to Oracle implementation which could be interesting to you.

DevArt 还有一个 LINQ to Oracle 实现,您可能会感兴趣。