Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server: Native client vs. ODBC?

Tags:

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

like image 829
juur Avatar asked Mar 17 '11 18:03

juur


People also ask

What is the difference between SQL Server and SQL Server Native Client?

Answer. The SQL Server Native Client 11.0 is a driver developed for more recent versions of SQL Server and as such it will be able to access some features of the SQL Server that the 'SQL Server' driver cannot.

When should I use Native Client SQL Server?

SQL Native Client should be used to create new applications or enhance existing applications that want to take advantage of new SQL Server 2019 features, such as database mirroring, multiple active result sets (MARS), query notifications, snapshot isolation, and XML data type support.

What is the difference between ODBC and SQL connection?

ODBC provides data types and functions that help applications to interact with the database. SQL is used to create queries to manipulate the data stored in a database.

Is SQL Server Native Client deprecated?

About - SQL Server Native Client | Microsoft Learn. This browser is no longer supported. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.


2 Answers

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

Microsoft is Aligning with ODBC for Native Relational Data Access

From the above link:

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

and

The commercial release of Microsoft SQL Server, codename 'Denali' will be the last release to support 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.""

(emphasis added)

like image 184
William Powell Avatar answered Oct 06 '22 11:10

William Powell


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.

like image 39
Josh Avatar answered Oct 06 '22 09:10

Josh