SQL Server:本机客户端与ODBC?

时间:2021-07-10 10:05:05

What is the difference between SQL Server Native Client connection and ODBC connection? What are the pros and cons of these two?

SQL Server Native Client连接和ODBC连接有什么区别?这两者的优点和缺点是什么?

2 个解决方案

#1


17  

Huh? ODBC is officially dead? Someone might want to let Microsoft know that:

咦? ODBC正式死了吗?有人可能想让微软知道:

Microsoft is Aligning with ODBC for Native Relational Data Access

Microsoft正在使用ODBC与本机关系数据访问进行对齐

From the above link:

从以上链接:

ODBC is the de-facto industry standard for native relational data access...

ODBC是本机关系数据访问的事实上的行业标准......

and

The commercial release of Microsoft SQL Server, codename 'Denali' will be the last release to support OLE DB.

Microsoft SQL Server的商业版本,代号'Denali'将是支持OLE DB的最后一个版本。

and finally,

最后,

"We encourage you to adopt ODBC in the development of your new and future versions of your application. You don’t need to change your existing applications using OLE DB, as they will continue to be supported on Denali throughout its lifecycle. While this gives you a large window of opportunity for changing your applications before the deprecation goes into effect, you may want to consider migrating those applications to ODBC as a part of your future roadmap. Microsoft is fully committed to making this transition as smooth and easy as possible.""

“我们鼓励您在开发应用程序的新版本和未来版本时采用ODBC。您无需使用OLE DB更改现有应用程序,因为它们将在Denali的整个生命周期中继续得到支持。在弃用生效之前,您有一个更改应用程序的大机会窗口,您可能需要考虑将这些应用程序迁移到ODBC作为未来路线图的一部分.Microsoft完全致力于使这种转换尽可能顺利和轻松。 “”

(emphasis added)

(重点补充)

#2


3  

ODBC is useful for times when the underlying database might change but you don't want your code to (assuming the SQL stays the same across technologies). You could connect to an Oracle database one day and switch out to a SQL server database the next. The disadvantage is that you don't get the optimizations that having specific drivers affords you. The SQL Server Native client driver has been proven to be much faster than just using a standard ODBC driver.

ODBC可用于底层数据库可能更改但您不想要代码的情况(假设SQL在各种技术之间保持不变)。您可以在某天连接到Oracle数据库,然后切换到SQL Server数据库。缺点是您没有获得具有特定驱动程序的优化。事实证明,SQL Server Native客户端驱动程序比仅使用标准ODBC驱动程序要快得多。

#1


17  

Huh? ODBC is officially dead? Someone might want to let Microsoft know that:

咦? ODBC正式死了吗?有人可能想让微软知道:

Microsoft is Aligning with ODBC for Native Relational Data Access

Microsoft正在使用ODBC与本机关系数据访问进行对齐

From the above link:

从以上链接:

ODBC is the de-facto industry standard for native relational data access...

ODBC是本机关系数据访问的事实上的行业标准......

and

The commercial release of Microsoft SQL Server, codename 'Denali' will be the last release to support OLE DB.

Microsoft SQL Server的商业版本,代号'Denali'将是支持OLE DB的最后一个版本。

and finally,

最后,

"We encourage you to adopt ODBC in the development of your new and future versions of your application. You don’t need to change your existing applications using OLE DB, as they will continue to be supported on Denali throughout its lifecycle. While this gives you a large window of opportunity for changing your applications before the deprecation goes into effect, you may want to consider migrating those applications to ODBC as a part of your future roadmap. Microsoft is fully committed to making this transition as smooth and easy as possible.""

“我们鼓励您在开发应用程序的新版本和未来版本时采用ODBC。您无需使用OLE DB更改现有应用程序,因为它们将在Denali的整个生命周期中继续得到支持。在弃用生效之前,您有一个更改应用程序的大机会窗口,您可能需要考虑将这些应用程序迁移到ODBC作为未来路线图的一部分.Microsoft完全致力于使这种转换尽可能顺利和轻松。 “”

(emphasis added)

(重点补充)

#2


3  

ODBC is useful for times when the underlying database might change but you don't want your code to (assuming the SQL stays the same across technologies). You could connect to an Oracle database one day and switch out to a SQL server database the next. The disadvantage is that you don't get the optimizations that having specific drivers affords you. The SQL Server Native client driver has been proven to be much faster than just using a standard ODBC driver.

ODBC可用于底层数据库可能更改但您不想要代码的情况(假设SQL在各种技术之间保持不变)。您可以在某天连接到Oracle数据库,然后切换到SQL Server数据库。缺点是您没有获得具有特定驱动程序的优化。事实证明,SQL Server Native客户端驱动程序比仅使用标准ODBC驱动程序要快得多。