简体   繁体   English

连接到SQL Server时OLEDB / ODBC驱动程序之间有什么区别?

[英]What are the differences between OLEDB/ODBC drivers when connecting to SQL Server?

I have an SQL Server database, and I need to push data into it through vbscript, as well as pull data into Excel. 我有一个SQL Server数据库,我需要通过vbscript将数据推送到它,以及将数据拉入Excel。 I have found multiple connection strings, but no repository for the benefits of performance and functionality comparing them. 我找到了多个连接字符串,但是没有存储库可以比较它们的性能和功能。 The driver options ( Provider= ) I have found so far are: 到目前为止我找到的驱动程序选项( Provider= )是:

  • {SQL Server} (ODBC) {SQL Server}(ODBC)
  • SQLOLEDB (newer than ODBC, but being deprecated ?) SQLOLEDB(比ODBC更新,但已被弃用 ?)
  • SQLOLEDB.1 (what Excel 2016 uses when clicking 'Get External Data', but not even mentioned on connectionstrings.com... I assume a newer version of the above, but still the deprecated technology?) SQLOLEDB.1(Excel 2016在点击“获取外部数据”时使用的内容,但在connectionstrings.com上甚至没有提到......我假设上面的新版本,但仍然是不推荐使用的技术?)
  • SQLNCLI11 (native client, OLE DB) SQLNCLI11(本机客户端,OLE DB)
  • {SQL Server Native Client 11.0} (native client, ODBC) {SQL Server Native Client 11.0}(本机客户端,ODBC)

Different things I read say that ODBC is better because it has been around longer. 我读到的不同的东西说ODBC更好,因为它已经存在更长时间。 And that OLE DB has been around long enough to have the same advantages. 并且OLE DB已经存在足够长的时间以具有相同的优势。 And OLE DB was made to work with a certain company's applications. 并且OLE DB可以与某个公司的应用程序一起使用。 And ODBC was made by the same company. ODBC是由同一家公司制作的。 And OLE DB can connect to and from different kinds of applications better. OLE DB可以更好地连接到不同类型的应用程序。 And ODBC works better with databases. ODBC对数据库的效果更好。 And Native is...Native, so must be better... because of the name? 原生是......原生,所以必须更好......因为这个名字?

I find multiple questions here on SO floating around with no or partial answers, or having multiple comments claiming the answers are out of date. 我发现这里有多个问题,没有或部分答案,或者有多个评论声称答案已经过时了。 So, as of now, what the specific differences between these different drivers ? 那么,截至目前, 这些不同驱动因素之间的具体差异是什么? Do they have different performance in different circumstances? 他们在不同情况下有不同的表现吗? Do they have different features? 他们有不同的功能吗? Do I need to do profiling to determine the best performance and reliability for my particular use case, or is there a standard "best practice" recommended by Microsoft or some recognized expert? 我是否需要进行性能分析以确定我的特定用例的最佳性能和可靠性,或者是否有Microsoft或某些公认的专家推荐的标准“最佳实践”? Or are they all basically doing the same thing and as long as it's installed on the target system it doesn't really matter? 或者它们基本上都在做同样的事情,只要它安装在目标系统上并不重要吗?

ODBC-it is designed for connecting to relational databases. ODBC-它旨在连接到关系数据库。 However, OLE DB can access relational databases as well as nonrelational databases. 但是,OLE DB可以访问关系数据库以及非关系数据库。

There is data in your mail servers, directory services, spreadsheets, and text files. 您的邮件服务器,目录服务,电子表格和文本文件中都有数据。 OLE DB allows SQL Server to link to these nonrelational database systems. OLE DB允许SQL Server链接到这些非关系数据库系统。 For instance, if you want to query, through SQL Server, the Active Directory on the domain controller, you couldn't do this with ODBC, because it's not a relational database. 例如,如果要通过SQL Server查询域控制器上的Active Directory,则无法使用ODBC执行此操作,因为它不是关系数据库。 However, you could use an OLE DB provider to accomplish that. 但是,您可以使用OLE DB提供程序来完成此操作。

http://www.sqlservercentral.com/Forums/Topic537592-338-1.aspx http://www.sqlservercentral.com/Forums/Topic537592-338-1.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将“经典 ASP/ADO”应用程序从 SQL Server 2008 移动到 SQL Server 2017 时,使用什么连接字符串和/或 OLEDB/ODBC 驱动程序? - What connection string and or OLEDB/ODBC drivers when moving “classic ASP/ADO” app from SQL Server 2008 to SQL Server 2017? ODBC 驱动程序的驱动程序之间的差异 - Differences Between Drivers for ODBC Drivers 无法在 Linux 上使用 ODBC 驱动程序连接 SQL Server - Unable to connect SQL Server with ODBC drivers on linux 使用本地计算机上的ODBC驱动程序连接到MS SQL数据库 - Connecting to MS SQL database using ODBC drivers from local machine Delphi与SQL Server:OLEDB与Native Client驱动程序 - Delphi with SQL Server: OLEDB vs. Native Client drivers 将 SQL Server 的 Linux ODBC 驱动程序添加到 Kaggle/Python docker 映像 - Adding Linux ODBC drivers for SQL Server to a Kaggle/Python docker image 不使用OLEDB / ODBC将Excel文件读入SQL Server - Reading Excel files into SQL Server not using OLEDB/ODBC 使用 odbc 将 django 连接到 MS SQL 服务器 - Connecting django to MS SQL Server using odbc 连接到SQL Server时,数据源的值是什么? - When connecting to SQL Server what are the values for the datasource? sql server身份验证和Windows身份验证之间有什么区别..? - what is the differences between sql server authentication and windows authentication..?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM