question

sakuraime avatar image
0 Votes"
sakuraime asked DanGuzman commented

.Net provider vs native OLEDB

What are the differences between the following highlighted ?

117575-image.png





Native OLE DB
Microsoft OLE DB Driver for SQL Server
SQL Server Native Client 11


.Net Providers
Sqlclient Data provider


.NetProviders oleDB
Microsoft OLE DB Driver for SQL Server
SQL Server Native Client 11




sql-server-general
image.png (327.7 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @sakuraime ,

We have not received a response from you. Did the reply could help you? If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

0 Votes 0 ·
DanGuzman avatar image
0 Votes"
DanGuzman answered DanGuzman edited

"Microsoft OLE DB Driver for SQL Server" is the SQL Server OLE DB driver that ships with Windows. This is included with the OS for backwards compatibility with legacy applications and not intended to be used for new development. It is unaware of SQL Server data types introduced after SQL 2000.

"SQL Server Native Client 11" is SQL Server 2012 native client, which includes OLE DB and ODBC support. This is not included with the OS. It may be installed stand-alone or bundled with other software, such as SQL Server. I'll add a newer OLE DB driver is available (MSOLEDBSQL) but apparently not installed here.

"SqlClient Data provider" is the .NET provider for SQL Server included with the .NET framework.

Note that all the drivers under the "Native OLE DB" list also appear under ".Net Providers for OleDb". These are the same drivers with the only difference being how they might be used. .NET applications must use System.Data.OleDb ADO.NET objects in order to use unmanaged OLE DB drivers (under ".Net Providers for OleDb"). But it is preferred to use a managed provider in .NET applications when possible to avoid the unmanaged interop performance penalty. For SQL Server, that is either System.Data.SqlClient or Microsoft.Data.SqlClient.



· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

thanks. but actually still a bit confusing . so which one in the following driver is still developing ?
117605-image.png


0 Votes 0 ·
image.png (326.9 KiB)

I'm not sure what you mean by "still developing" but there will no new releases for the native OLE DB drivers except perhaps patches for security and bugs. The MSOLEDBSQL driver (not listed) is the most current SQL Server OLE DB driver and only that one will be enhanced going forward.

For .NET managed apps (not OLE DB), Microsoft.Data.SqlClient is the most current driver. The System.Data.SqlClient will continue to be included with .NET framework too but the development focus will be Microsoft.Data.SqlClient per this blog post.


0 Votes 0 ·
YitzhakKhabinsky-0887 avatar image
0 Votes"
YitzhakKhabinsky-0887 answered DanGuzman commented

Hi @sakuraime,

(1) Microsoft OLE DB Provider for SQL Server (SQLOLEDB)

It is not maintained anymore and it is not recommended to use this driver for new development.

(2) SQL Server Native Client (SNAC)

It was announced as deprecated in 2011 and it is not recommended to use this driver for new development.

(3) Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL) is the latest

The new OLE DB provider is called the Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL). The new provider will be updated with the most recent server features going forward.

You can read about all of them directly from Microsoft:
- oledb-driver-for-sql-server
- released-microsoft-ole-db-driver-for-sql-server


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

thanks .

so I should use

Native OLEDB -> Microsoft OLE DB Driver for SQL Server or
.Net provider -> Microsoft OLE DB Driver for SQL Server

in the SSIS package ?

0 Votes 0 ·

Both of these are the same driver. Do not use "Microsoft OLE DB Driver for SQL Server". With SSIS, it is better to use the "SQL Server Native Client 11.0" OLE DB driver unless you have installed "Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL)".

0 Votes 0 ·