What is the difference between SQL Server Native Client connection and ODBC connection? What are the pros and cons of these two?
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.
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.
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.
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.
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)
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With