SQL Server Native Client
Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance Azure Synapse Analytics Analytics Platform System (PDW)
SQL Server Native Client, also known as SNAC or SQLNCLI, refers to the ODBC and OLE DB drivers for SQL Server, prior to SQL Server 2022 (16.x).
Important
SQL Server Native Client (SNAC) isn't shipped with:
- SQL Server 2022 (16.x) and later versions
- SQL Server Management Studio 19 and later versions
The SQL Server Native Client (SQLNCLI or SQLNCLI11) and the legacy Microsoft OLE DB Provider for SQL Server (SQLOLEDB) aren't recommended for new application development.
For new projects, use one of the following drivers:
For SQLNCLI that ships as a component of SQL Server Database Engine (versions 2012 through 2019), see this Support Lifecycle exception.
Note
For more information and to download the SNAC or ODBC Drivers, see the SNAC lifecycle explained blog post. For more information on ODBC Driver for SQL Server, see Microsoft ODBC Driver for SQL Server.
Information on the SQL Server Native Client features released with SQL Server 2012 (11.x), the last available version of SQL Server native Client:
- SQL Server Native Client Support for LocalDB
- Metadata Discovery
- UTF-16 Support in SQL Server Native Client 11.0
- SQL Server Native Client Support for High Availability, Disaster Recovery
- Accessing Diagnostic Information in the Extended Events Log
ODBC in SQL Server Native Client supports three features that were added to standard ODBC in the Windows 7 SDK:
Asynchronous execution on connection-related operations. For more information, see Asynchronous Execution.
C data type extensibility. For more information, see C Data Types in ODBC.
To support this feature in SQL Server Native Client,
SQLGetDescField
can return SQL_C_SS_TIME2 (for time types) or SQL_C_SS_TIMESTAMPOFFSET (for datetimeoffset) instead of SQL_C_BINARY, if your application uses ODBC 3.8. For more information, see Data Type Support for ODBC Date and Time Improvements.Calling
SQLGetData
with a small buffer multiple times to retrieve a large parameter value. For more information, see Retrieving Output Parameters Using SQLGetData.
The following articles describe SQL Server Native Client behavior changes in SQL Server 2012 (11.x).
The value passed to the
pwszName
parameter must be a valid identifier when callingICommandWithParameters::SetParameterInfo
. For more information, see ICommandWithParameters.SQLDescribeParam
consistently returns an ODBC specification conforming value. For more information, see SQLDescribeParam.ODBC Driver Behavior Change When Handling Character Conversions