Edit

Share via


Microsoft OLE DB Driver for SQL Server

Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance Azure Synapse Analytics Analytics Platform System (PDW) SQL analytics endpoint in Microsoft Fabric Warehouse in Microsoft Fabric SQL database in Microsoft Fabric

Download OLE DB driver

The OLE DB Driver for SQL Server is a stand-alone data access application programming interface (API), that is part of OLE DB. It was introduced in SQL Server 2005 (9.x). The OLE DB Driver for SQL Server is delivered in one dynamic-link library (DLL). It provides new functionality beyond the SQL Server OLE DB provider supplied by the Windows Data Access Components (Windows DAC, formerly Microsoft Data Access Components, or MDAC). The OLE DB Driver for SQL Server can be used to create new applications or enhance existing applications that need to take advantage of features such as multiple active result sets (MARS), user-defined data types (UDT), query notifications, snapshot isolation, XML data type support, Microsoft Entra ID, and strict encryption.

For a list of the differences between OLE DB Driver for SQL Server and Windows DAC, plus information about issues to consider before updating a Windows DAC application to OLE DB Driver for SQL Server, see Updating an Application to OLE DB Driver for SQL Server from MDAC.

The OLE DB Driver for SQL Server can be used with OLE DB Core Services supplied with Windows DAC, but this use isn't a requirement. The choice to use Core Services depends on the requirements of the individual application (for example, if connection pooling is required).

ActiveX Data Object (ADO) applications can use the OLE DB Driver for SQL Server, but you should use ADO with the DataTypeCompatibility connection string keyword (or its corresponding DataSource property). The OLE DB Driver for SQL Server allows ADO applications to use features introduced in SQL Server 2005 (9.x), which are available with OLE DB Driver for SQL Server via connection string keywords or OLE DB properties or Transact-SQL. For more information about the use of these features with ADO, see Using ADO with OLE DB Driver for SQL Server.

OLE DB Driver for SQL Server was designed to provide a simplified method of gaining native data access to SQL Server using OLE DB. It provides a way to innovate and evolve new data access features without changing the current Windows DAC components, which are now part of the Microsoft Windows platform.

While OLE DB Driver for SQL Server uses components in Windows DAC, it isn't explicitly dependent on a particular version of Windows DAC. You can use OLE DB Driver for SQL Server with the version of Windows DAC that is installed with any operating system supported by OLE DB Driver for SQL Server.

Different generations of OLE DB Drivers

There are three distinct generations of Microsoft OLE DB providers for SQL Server.

The newest generation of the OLE DB driver (MSOLEDBSQL) offers the latest features, including:

  • TLS 1.3 support
  • multiple language support
  • support for various SQL Server features for Availability Groups
  • Microsoft Entra ID support

The OLE DB provider was undeprecated and released in 2018. For details on improvements and fixes, see Release notes. Previously called OLE DB provider, the new name is the Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL). The new driver is updated with the most recent server features.

You should use the new Microsoft OLE DB Driver for SQL Server with new and existing applications. Convert your existing applications connection strings from SQLOLEDB or SQLNCLI, to MSOLEDBSQL19 or MSOLEDBSQL.

2. SQL Server Native Client (SNAC)

SQL Server Native Client (SNAC) was available starting with SQL Server 2005 (9.x). SNAC includes an OLE DB provider interface (SQLNCLI) and is the OLE DB provider that shipped with SQL Server 2005 (9.x) through SQL Server 2012 (11.x).

The SQL Server Native Client (often abbreviated SNAC) was removed from SQL Server 2022 (16.x) and SQL Server Management Studio 19 (SSMS). The SQL Server Native Client OLE DB providers (SQLNCLI or SQLNCLI11) aren't recommended for new development. Switch to the new Microsoft OLE DB Driver (MSOLEDBSQL) for SQL Server going forward. For more information about the SNAC lifecycle and available downloads, see SNAC lifecycle explained.

3. Microsoft OLE DB Provider for SQL Server (SQLOLEDB)

The Microsoft OLE DB Provider for SQL Server (SQLOLEDB) was the original OLE DB connectivity software for SQL Server applications. It still ships as part of Windows Data Access Components. It isn't maintained anymore and it isn't recommended to use this driver for new development. The legacy Microsoft OLE DB Provider for SQL Server (SQLOLEDB) isn't recommended for new development. Switch to the new Microsoft OLE DB Driver (MSOLEDBSQL) for SQL Server going forward.

In this section

Article Description
When to Use OLE DB Driver for SQL Server Discusses how OLE DB Driver for SQL Server fits in with Microsoft data access technologies, how it compares to Windows DAC and ADO.NET, and provides pointers for deciding which data access technology to use.
OLE DB Driver for SQL Server features Describes the features supported by OLE DB Driver for SQL Server.
Building applications with OLE DB Driver for SQL Server Provides an overview of OLE DB Driver for SQL Server development, including how it differs from Windows DAC, the components that it uses, and how ADO can be used with it. This section also discusses OLE DB Driver for SQL Server installation and deployment, including how to redistribute the OLE DB Driver for SQL Server library.
System requirements for OLE DB Driver for SQL Server Discusses the system resources needed to use OLE DB Driver for SQL Server.
OLE DB Driver for SQL Server Programming Provides information about using the OLE DB Driver for SQL Server.
Finding More OLE DB Driver for SQL Server Information Provides more resources about OLE DB Driver for SQL Server, including links to external resources and getting further assistance.