Repository navigation
Releases
Stable Release v8.0.0
The driver and its four companion packages are version-aligned at 8.0.0. Use matching versions of all installed family packages. The family AssemblyVersion is 8.0.0.0; .NET Framework applications upgrading from 7.x should review strong-name binding redirects. Native SNI and Microsoft.SqlServer.Server remain independently versioned.
Companion package release notes
- Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 8.0.0
- Microsoft.Data.SqlClient.Extensions.Azure 8.0.0
- Microsoft.Data.SqlClient.Extensions.Abstractions 8.0.0
- Microsoft.Data.SqlClient.Internal.Logging 8.0.0
Changes Since 8.0.0-preview1
Changed
Breaking default change: pool waits share the connection timeout budget
What Changed:
Switch.Microsoft.Data.SqlClient.UseOverallConnectTimeoutForPoolWaitnow defaults totrue.SqlConnection.OpenandOpenAsynccarry the remainingConnect Timeoutbudget through pool acquisition and login with either pool implementation. (#4642, #5030, #5046)
Who Benefits:
- Applications under pool contention no longer grant login a fresh full timeout after waiting.
Impact:
- Opens may time out sooner. Set the switch to
falsebefore using SqlClient to restore the prior separate budgets; the switch is cached on first use.Connect Timeout=0stays infinite. This does not claim that every remaining in-open round trip has been converted. See networking migration guidance.
Lower destination-metadata cost for name-mapped bulk copies
What Changed:
SqlBulkCopyrestores fastSET FMTONLY ON; SELECT *discovery for destination-name mappings, with one catalog fallback if a name is missing. Destination-ordinal mappings, implicit/default mappings, and SQL Graph aliases use catalog discovery directly. (#4985, #4988, #5036)
Who Benefits:
- Repeated name-mapped bulk loads avoid unnecessary catalog-query work on the server.
Impact:
- Automatic mode preserves hidden-column positions and graph-alias support. Fallback happens before rows are sent; it does not retry the write.
Switch.Microsoft.Data.SqlClient.UseBulkCopyCatalogMetadataDiscovery=truealways uses catalog discovery and avoids fallback for hidden-name workloads. Explicitfalsenever uses catalogs and uses visible-column positions, without hidden-column or graph-alias discovery. Leaving the switch unset selects automatic mode.
Asynchronous command execution awaits enclave attestation
What Changed:
- Asynchronous command execution now awaits enclave-session lookup, attestation preparation, session creation, and retry-time invalidation, including the shared reader, nonquery, scalar, XML, APM, and batch paths. Caller cancellation reaches enclave-provider operations. (#3672, #4887, #5066)
Who Benefits:
- Always Encrypted applications avoid blocking on attestation-service I/O in async execution.
Impact:
- Preparation failure or cancellation stops the user query from being sent and releases setup state. Synchronous execution retains synchronous provider dispatch.
- Key-store operations, enclave-package generation, cryptography, and serialization can still run synchronously. This is not end-to-end asynchronous Always Encrypted support. See asynchronous enclave attestation.
Dependency and authentication-diagnostic updates
- Updated Azure.Core to
1.65.0, MSAL and its broker to4.92.0, and the applicable .NET 10 dependency floors to10.0.15. The exact per-framework direct dependencies are listed below. IdentityModel, Key Vault Keys, and legacy polyfill versions are unchanged from preview1. (#5031, #5041) - Updated native SNI dependencies from
8.0.0-preview1.26309.4to8.0.0. (#5144, #5146) - Authentication configuration/registration diagnostics now use resources owned by Abstractions. Existing translated messages move with their satellite assemblies; messages without a translation fall back to English. Exception types and authentication contracts are unchanged, but exact message text can change. See the Abstractions companion notes. (#4852, #5044)
Fixed
-
Fixed managed networking deadlocks when opening connections on a single-worker scheduler. Parallel SQL Browser (SSRP) requests now run on the default scheduler, and Strict TLS authentication completes without capturing the blocked caller's scheduler. (net10.0, managed SNI only) (#5147, #5148)
-
Fixed
ExecuteXmlReaderAsyncandBeginExecuteXmlReaderobserving the first attempt while an invalid enclave session is being retried. Completion now follows the retry's outcome, and a successful retry releases the original asynchronous reservation. This avoids competing reads of the TDS response, misleading XML/protocol errors, and failed connection reuse. (#5117, #5136) -
Removed a socket-poll wait from pooled TCP connection health checks, avoiding an approximately 15 ms delay when reopening healthy idle connections on Windows with managed networking. Peer-close detection is retained. The nonblocking check also runs on Unix, where the old timeout already rounded down to zero. Native SNI and .NET Framework are unaffected. (net10.0, managed SNI only) (#5070, #5071, #5099)
-
Fixed managed TCP sends after connection disposal reporting an unexpected
NullReferenceExceptioninstead of the existing connection-error path. (net10.0, managed SNI only) (#5067, #5076) -
Fixed managed SNI TLS handshakes ignoring the remaining login timeout, which could block
Open/OpenAsyncand pool users for minutes when a server or network stalls after PRELOGIN. This bounds the handshake, not every separate pool-wait behavior. (net10.0, managed SNI only) (#4834, #5045, #5051, #5078) -
Fixed
SqlTransaction.Dispose()throwingNullReferenceExceptionorInvalidOperationExceptionwhen it races the background close of a connection broken by a network failure or an unacknowledged command timeout, obscuring the original error. (#4971, #4972, #5053) -
Fixed late
SqlBatchcancellation errors being hidden byArgumentOutOfRangeExceptionwhen the last command has already completed. Valid command attribution is preserved. (#5042, #5058, #5063)
Cumulative Changes Since 7.1.2
This view combines the delta above with the customer-facing changes introduced in preview1. Changes already shipped in 7.1.1 or 7.1.2, including the user-agent configured-compatibility bits, are not presented again as new in 8.0, even though preview1's branch-cut baseline included them.
Added
- SQL Server float16 vectors,
SqlVector<Half>(net10.0 only), and per-connectionVector Type Support/SqlConnectionStringBuilder.VectorTypeSupportnegotiation. The default is V2: modern .NET returns native float16 vectors rather than JSON strings. Usev1for the previous float16 string contract orofffor all-vector text results. .NET Framework can read float16 as text or widenedSqlVector<float>values. Column-schemaVectorBaseTypeandVectorDimensionsidentify negotiated native metadata. Parameters and bulk copy support native base-type conversion; vector TVPs are not added. Float16 requires server support andPREVIEW_FEATURESwhile in preview. (#4501) - Opt-in pooled transaction-isolation reset through
Switch.Microsoft.Data.SqlClient.EnableTransactionIsolationLevelReset(defaultfalse). SqlClient-tracked isolation change...
Stable Release v7.1.2
This servicing release includes security updates, certificate and enclave-session validation fixes, and improvements to result reading and managed networking.
Use matching 7.1.2 versions of the driver and companion packages. Assemblies retain AssemblyVersion 7.0.0.0; no new .NET Framework binding redirects are required when upgrading from 7.1.1. Microsoft.SqlServer.Server is unchanged and versioned independently.
Changes Since 7.1.1
Changed
- Updated dependencies to address CVE-2026-84008:
System.Security.Cryptography.Pkcs8.0.2 for net462/net8.0/netstandard2.0 and affected .NET 9 dependencies, includingSystem.Threading.RateLimiting, to 9.0.21. - Updated native SNI dependencies to 7.1.2.
- Added user-agent reporting for async and SNI compatibility switches. Async behavior and switch defaults are unchanged.
Fixed
- Enforced an explicit
HostNameInCertificateduring managed SNI certificate validation, even when the certificate matches the server name (net8.0/net9.0). (#4907) - Isolated Always Encrypted enclave-session cache entries by attestation protocol. (#4866)
- Fixed unobserved receive exceptions and packet cleanup when closing managed SNI connections with MARS reads pending (net8.0/net9.0). (#4951)
- Fixed
SqlDataReader.HasRowsreturningfalsewhen informational messages precede the first row. (#4900) - Fixed statistics timer races throwing "Nullable object must have a value." Connection and MARS use remain non-thread-safe. (#4895)
- Fixed sequential
GetTextReaderreads corruptingnvarchartext on big-endian platforms. (#4961) - Rejected malformed PRELOGIN responses with a corrupted-stream error instead of
IndexOutOfRangeException. (#4977) - Rejected row, alternate-result, and authentication responses missing required metadata or state, and prevented affected connections from returning to the pool. (#4983)
- Fixed eager Windows native SNI initialization causing
TypeInitializationExceptionorDllNotFoundExceptionon Unix (net8.0/net9.0). (#4770)
Companion Packages
All packages below ship as 7.1.2.
| Package | Highlights |
|---|---|
| Extensions.Azure | Added actionable guidance for Windows WAM window_handle_required errors, preserving the original error code and inner exception. |
| AlwaysEncrypted.AzureKeyVaultProvider | Version alignment only; no functional or API changes. |
| Extensions.Abstractions | Version alignment only; no functional or API changes. |
| Internal.Logging | Version alignment only; internal use, not for direct application references. |
For Windows WAM errors, provide a parent window through SetParentActivityOrWindowFunc, or use Authentication=Active Directory Default with a configured non-interactive credential in windowless hosts. Interactive authentication without WAM requires a custom ApplicationClientId and UseWamBroker=false. WAM remains enforced for SqlClient's first-party application ID; no automatic fallback was added.
Platform Support
.NET Framework 4.6.2+ on Windows and .NET 8.0+ on Windows, Linux, and macOS. Companion package targets and dependency lists are included in the linked package notes.
Thanks to LaurensVergote and shreyarao4 for contributing.
Stable Release v7.0.4
This servicing release includes security updates, certificate and enclave-session validation fixes, and improvements to result reading and managed networking.
Use matching 7.0.4 versions of the driver and companion packages. Assemblies retain AssemblyVersion 7.0.0.0; no new .NET Framework binding redirects are required when upgrading from 7.0.3. Microsoft.SqlServer.Server is unchanged and versioned independently.
Changes Since 7.0.3
Changed
- Updated dependencies to address CVE-2026-84008:
System.Security.Cryptography.Pkcs8.0.2 for net462/net8.0/netstandard2.0 and affected .NET 9 dependencies to 9.0.21. - Updated native SNI dependencies to 6.0.4.
- Updated user-agent telemetry to v2 and added compatibility-switch reporting. Async behavior and switch defaults are unchanged.
Fixed
- Enforced an explicit
HostNameInCertificateduring managed SNI certificate validation, even when the certificate matches the server name (net8.0/net9.0). (#4908) - Isolated Always Encrypted enclave-session cache entries by attestation protocol. (#4867)
- Fixed unobserved receive exceptions and packet cleanup when closing managed SNI connections with MARS reads pending (net8.0/net9.0). (#4950)
- Fixed
SqlDataReader.HasRowsreturningfalsewhen informational messages precede the first row. (#4899) - Fixed statistics timer races throwing "Nullable object must have a value." Connection and MARS use remain non-thread-safe. (#4897)
- Fixed sequential
GetTextReaderreads corruptingnvarchartext on big-endian platforms. (#4962) - Rejected malformed PRELOGIN responses with a corrupted-stream error instead of
IndexOutOfRangeException. (#4978) - Rejected row, alternate-result, and authentication responses missing required metadata or state, and prevented affected connections from returning to the pool. (#4982)
Companion Packages
All packages below ship as 7.0.4.
| Package | Highlights |
|---|---|
| Extensions.Azure | Added actionable guidance for Windows WAM window_handle_required errors, preserving the original error code and inner exception. |
| AlwaysEncrypted.AzureKeyVaultProvider | Version alignment only; no functional or API changes. |
| Extensions.Abstractions | Version alignment only; no functional or API changes. |
| Internal.Logging | Version alignment only; internal use, not for direct application references. |
For Windows WAM errors, provide a parent window through SetParentActivityOrWindowFunc, or use Authentication=Active Directory Default with a configured non-interactive credential in windowless hosts. Interactive authentication without WAM requires a custom ApplicationClientId and UseWamBroker=false. WAM remains enforced for SqlClient's first-party application ID; no automatic fallback was added.
Platform Support
.NET Framework 4.6.2+ on Windows and .NET 8.0+ on Windows, Linux, and macOS. Companion package targets and dependency lists are included in the linked package notes.
Thanks to LaurensVergote for contributing.
Preview Release v8.0.0-preview1
This first 8.0 preview includes changes since the release/7.1 branch point, 92f220956b07328054701a869f452cade51830c1 (2026-09-15), through b87ca6e7643611ddc3273324de346d09e8ff2c43. Changes already shipped in 7.1.1 are identified below because the branch-cut baseline predates that release.
The driver and its four companion packages use package version 8.0.0-preview1. The family AssemblyVersion changes from 7.0.0.0 to 8.0.0.0; .NET Framework applications should review strong-name binding redirects when upgrading. Native SNI and Microsoft.SqlServer.Server remain independently versioned.
Companion package release notes
- Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 8.0.0-preview1
- Microsoft.Data.SqlClient.Extensions.Azure 8.0.0-preview1
- Microsoft.Data.SqlClient.Extensions.Abstractions 8.0.0-preview1
- Microsoft.Data.SqlClient.Internal.Logging 8.0.0-preview1
Added
Vector float16 support and per-connection version negotiation
What Changed:
- Added support for SQL Server
vector(N, float16), including reader values, parameters, output parameters, column schema, and bulk copy. On modern .NET, useSqlVector<Half>; the existingSqlVector<float>API remains supported. (#4501) - Added the
Vector Type Supportconnection-string keyword andSqlConnectionStringBuilder.VectorTypeSupport, of typeSqlVectorTypeSupport. Values areOff,V1, andV2; the default isV2.
Who Benefits:
- Applications storing embeddings can use float16 vectors with smaller element payloads, while choosing the result-type contract independently for each connection.
Impact:
- Result-type change: when the server negotiates V2, modern .NET returns native
SqlVector<Half>values for float16 columns instead of JSON strings. SetVector Type Support=v1to preserve float16 JSON-string results, oroffto receive all vector columns as text. Different settings use separate connection pools. - .NET Framework has no
System.Half. Float16 columns remain available as JSON strings or throughGetSqlVector<float>, which widens their elements exactly. Prefer the latter when reading many values, to avoid the additional JSON serialization. GetColumnSchema()exposesVectorBaseTypeandVectorDimensionsthrough the column indexer when native vector metadata is negotiated.- SQL Server performs cross-base conversion for native vector parameters and bulk-copy inputs. Typed vectors are not automatically serialized for text destinations; supply JSON strings or an explicit SQL cast instead. Vector TVPs are not added by this change.
- Float16 requires a server that supports it; enable
PREVIEW_FEATURESwhile the server feature is in preview. See the float16 sample.
var builder = new SqlConnectionStringBuilder(connectionString)
{
VectorTypeSupport = SqlVectorTypeSupport.V1
};Opt-in reset of pooled transaction isolation levels
What Changed:
- Added
Switch.Microsoft.Data.SqlClient.EnableTransactionIsolationLevelReset, defaultfalse. When enabled, a SqlClient-tracked isolation-level change is reset toREAD COMMITTEDbefore pooled reuse when no existing enlistment or active delegated transaction root remains. (#96, #4330)
Who Benefits:
- Applications that otherwise inherit an isolation level left by a previous user of a pooled connection.
Impact:
- Enable the switch before opening connections. A necessary reset adds a round trip and uses the remaining open-timeout budget. Known Azure Synapse dedicated SQL pool endpoints are excluded; the default preserves existing behavior.
- A user-issued
SET TRANSACTION ISOLATION LEVELalone does not mark the connection for this reset. The switch is not general cleanup for arbitrary T-SQL session changes.
Additional TimeOnly write paths (net10.0 only)
What Changed:
- Added
TimeOnlysupport forSqlBulkCopyDataRow/DataTable sources andSqlParametervalues withSqlDbType.Variant, writing SQLtimevalues. (#4604)
Who Benefits:
- Applications using modern .NET time-only values in bulk-copy and variant workflows.
Impact:
- These paths no longer require conversion to
TimeSpan. This does not addTimeOnlyto .NET Framework.
Authentication diagnostics
What Changed:
- The Azure extension forwards MSAL, allowlisted Azure.Identity, and SqlClient token acquisition events to
Microsoft.Data.SqlClient.EventSourceusing the newAuthenticationTracekeyword (0x2000). (#1846, #4872)
Who Benefits:
- Support teams can diagnose built-in Entra ID authentication without implementing a custom provider or logging callback.
Impact:
-
Collect authentication events with
0x2000, or authentication plus ordinary trace with0x2002. On modern .NET:dotnet-trace collect --process-id <pid> --providers Microsoft.Data.SqlClient.EventSource:0x2000:5 --rundown false -
On .NET Framework, use ETW or an in-process
EventListener. PII logging remains disabled for extension-owned requests. Correlation is best effort; some Azure.Identity events have an empty connection ID and can originate from application-owned credentials. Treat captures as sensitive operational data. -
See the Azure extension notes for limitations and the logging sample.
Changed
Breaking change: minimum modern runtime is .NET 10
What Changed:
- Replaced the
net8.0andnet9.0driver implementation targets withnet10.0. .NET Framework 4.6.2 support is retained. (#4779)
Who Benefits:
- Applications moving to the .NET 10 runtime and dependency servicing band.
Impact:
- Upgrade modern applications to .NET 10, or remain on a compatible earlier driver. Retained
netstandard2.0reference/unsupported-platform assets do not extend driver runtime support to .NET 8 or .NET 9.
Breaking change: TCP MultiSubnetFailover is enabled by default
What Changed:
- When omitted from the connection string,
MultiSubnetFailovernow defaults totruefor TCP connections.TransparentNetworkIPResolutiondefaults tofalseon .NET Framework. (#4876, #4927)
Who Benefits:
- Applications connecting to multi-address hosts try resolved IP addresses in parallel, without needing an explicit opt-in.
Impact:
- Explicit values remain authoritative. The automatic default is disabled for non-TCP protocols, LocalDB, database mirroring partners,
admin:/via:, and unprefixed local servers using native SNI. Explicittruestill fails with unsupported protocols or failover partners. MSF retains its 64-address limit. - With native SNI on Windows, an unprefixed remote host now uses TCP only, without Named Pipes fallback. Use
np:orMultiSubnetFailover=falsewhen needed. - With MSF enabled,
IPAddressPreferenceand TNIR are ignored. The builder reports the keyword default, not the routing decision for a particular connection. - Restore the old MSF default with
Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault=false. On .NET Framework, also setSwitch.Microsoft.Data.SqlClient.DisableTNIRByDefaultInConnectionString=falseto restore the previous TNIR default. Set switches before using SqlClient. See networking migration guidance.
Breaking change: Azure Attestation requires the Azure extension
What Changed:
- Moved Azure Attestation token validation and the IdentityModel dependencies from the core driver to
Microsoft.Data.SqlClient.Extensions.Azure. (#4017, #4790)
Who Benefits:
- Applications not using Azure Attestation no longer receive these dependencies from core.
Impact:
- Applications using
Attestation Protocol=AASmust explicitly reference the matching Azure extension. Without it, enclave session setup throwsInvalidOperationException. - The Azure extension now depends on Azure.Core rather than Azure.Identity. Credential namespaces are unchanged. Remove direct Azure.Identity references older than 1.21.0, or upgrade to 1.21.0 or later; Azure.Identity.Broker users need 1.6.0 or later. (#4749)
Breaking changes: reference API and argument validation corrections
What Changed:
- Reference APIs now match implementation accessibility and sealing, and no longer expose the nonexistent
SqlBatchCommand.CanCreateParametersetter on .NET Framework. ([#4832](https://github.c...
Stable Release v6.1.8
This update brings the following changes since the 6.1.7 release:
Changed
-
Updated the
System.Security.Cryptography.Pkcsdependency to 8.0.2 (was 8.0.1) for .NET Framework 4.6.2, .NET 8.0, and .NET Standard 2.0, and updated theMicrosoft.Extensions.Caching.Memory,System.Configuration.ConfigurationManager, andSystem.Security.Cryptography.Pkcsdependencies to 9.0.21 (was 9.0.11) for .NET 9.0.
(#4842, #4862, #4870) -
Improved the error reported when
Active Directory Interactiveauthentication through the Windows Web Account Manager (WAM) broker fails because the host has no parent window, such as a service or Azure Functions host. The resulting error now explains the supported alternatives: supply a parent window withSetParentActivityOrWindowFunc, useActive Directory Defaultwith a configured non-interactive credential, or supply a customApplicationClientIdwithUseWamBrokerdisabled. The original MSAL error code and inner exception are preserved, and authentication selection, retry behavior, and other failures are unchanged. (Windows only)
(#4854, #4858, #4918)
Fixed
-
Fixed the managed SNI path ignoring
HostNameInCertificateduring server certificate validation. WhenHostNameInCertificateis set, it is now the only host name the server certificate is validated against, and certificates that do not match it are rejected. Default host-name selection when the property is not set, certificate chain validation,ServerCertificatematching, and the connection destination are unchanged. (net8.0/net9.0 only)
(#4905, #4909) -
Fixed Always Encrypted enclave session caching so that cached enclave sessions are isolated by attestation protocol. A session established with one
Attestation Protocolsetting is no longer reused by a connection to the same server, database, and attestation URL that uses a different protocol.
(#4829, #4868) -
Fixed
SqlDataReader.HasRowsreturningfalsewhen a result set contains rows but the server sends multiple informational messages, or an informational message before anORDERtoken, ahead of the first row. Empty results still reportfalse, andInfoMessagedelivery is unchanged.
(#3018, #4773, #4898) -
Fixed an intermittent
InvalidOperationException("Nullable object must have a value") from statistics bookkeeping when commands complete concurrently on a MARS connection. This issue was reported as a regression starting with 6.1.4.
(#4778, #4875, #4896) -
Fixed Entra ID authentication when the server supplies an authority URL with an OAuth endpoint suffix, such as
https://login.microsoftonline.com/<tenant>/oauth2/authorizereturned by the Dataverse/Dynamics 365 TDS endpoint. The provider now extracts the tenant from the first path segment and uses the normalized authority for Azure.Identity credentials, MSAL, and their cache keys. An authority URL that cannot be parsed now fails with a clear, localizedArgumentExceptionnaming the authority. Bare tenant authority URLs used by Azure SQL and Fabric retain their existing behavior.
(#4496, #4521, #4791, #4807)
Target Platform Support
- .NET Framework 4.6.2+ (Windows x86, Windows x64, Windows ARM64)
- .NET 8.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)
- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)
Full details: release-notes/6.1/6.1.8.md
Stable Release v7.1.1
This servicing release fixes decimal parameter validation, token expiry handling in connection pool V2, and connection opens that are in progress when a pool is cleared.
Package version alignment: The SqlClient family packages share the
7.1.1version:
Microsoft.Data.SqlClientMicrosoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProviderMicrosoft.Data.SqlClient.Extensions.AzureMicrosoft.Data.SqlClient.Extensions.AbstractionsMicrosoft.Data.SqlClient.Internal.Logging
Microsoft.SqlServer.Serveris versioned independently and is not part of this release. Applications should use matching7.1.1versions of the driver and its companion packages. The aligned assemblies retainAssemblyVersion 7.0.0.0; upgrading from7.1.0does not require new .NET Framework strong-name binding redirects.
Companion package release notes
- Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 7.1.1
- Microsoft.Data.SqlClient.Extensions.Azure 7.1.1
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.1
- Microsoft.Data.SqlClient.Internal.Logging 7.1.1
Changes Since 7.1.0
Fixed
-
Fixed an
ArgumentExceptionwhen sending zero-valueddecimalorSqlDecimalparameters whose precision equals their scale. Nonzero precision validation and support for large decimal values are unchanged. (#4715, #4721, #4732) -
Fixed connection pool V2 handing out pooled connections with expired or nearly expired access tokens. The pool now checks token expiry before reuse, matching the default pool's behavior while preserving transaction-affine reuse. This affects only applications that opt in to connection pool V2. (#4734, #4739)
-
Fixed connection opens failing when
ClearPoolorClearAllPoolsraces with an in-flight open. Requests already admitted to the cleared pool can finish, and connections returned to the retired pool are discarded rather than reused. (#4714, #4718, #4740)
Target Platform Support
- .NET Framework 4.6.2+ (Windows x86, Windows x64, Windows ARM64)
- .NET 8.0+ (Windows x86, Windows x64, Windows ARM, Windows ARM64, Linux, macOS)
Dependencies
.NET 9.0
- Microsoft.Bcl.Cryptography 9.0.18
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.1
- Microsoft.Data.SqlClient.Internal.Logging 7.1.1
- Microsoft.Data.SqlClient.SNI.runtime 7.1.0
- Microsoft.Extensions.Caching.Memory 9.0.18
- Microsoft.IdentityModel.JsonWebTokens 8.16.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 8.16.0
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 9.0.18
- System.Security.Cryptography.Pkcs 9.0.18
- System.Threading.RateLimiting 9.0.18
.NET 8.0
- Microsoft.Bcl.Cryptography 8.0.0
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.1
- Microsoft.Data.SqlClient.Internal.Logging 7.1.1
- Microsoft.Data.SqlClient.SNI.runtime 7.1.0
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.IdentityModel.JsonWebTokens 8.16.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 8.16.0
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 8.0.1
- System.Security.Cryptography.Pkcs 8.0.1
- System.Threading.RateLimiting 8.0.0
.NET Standard 2.0
- Microsoft.Bcl.Cryptography 8.0.0
- Microsoft.Bcl.TimeProvider 8.0.1
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.1
- Microsoft.Data.SqlClient.Internal.Logging 7.1.1
- Microsoft.Data.SqlClient.SNI.runtime 7.1.0
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.IdentityModel.JsonWebTokens 8.16.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 8.16.0
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 8.0.1
- System.Security.Cryptography.Pkcs 8.0.1
- System.Text.Json 10.0.3
- System.Threading.Channels 10.0.3
- System.Threading.RateLimiting 8.0.0
.NET Framework 4.6.2+
- Microsoft.Bcl.Cryptography 8.0.0
- Microsoft.Bcl.TimeProvider 8.0.1
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.1
- Microsoft.Data.SqlClient.Internal.Logging 7.1.1
- Microsoft.Data.SqlClient.SNI 7.1.0
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.IdentityModel.JsonWebTokens 8.16.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 8.16.0
- System.Buffers 4.6.1
- System.Data.Common 4.3.0
- System.Diagnostics.DiagnosticSource 10.0.3
- System.Memory 4.6.3
- System.Runtime.InteropServices.RuntimeInformation 4.3.0
- System.Security.Cryptography.Pkcs 8.0.1
- System.Text.Json 10.0.3
- System.Threading.Channels 10.0.3
- System.Threading.RateLimiting 8.0.0
- System.ValueTuple 4.6.2
Stable Release v7.1.0
This is the general availability release of Microsoft.Data.SqlClient 7.1. It closes out the 7.1 preview cycle with application identity reporting for telemetry, the deprecation of TransparentNetworkIPResolution, and a set of connection, transaction, and Named Pipes fixes.
Important — package version alignment: Starting with the 7.0.2 release, the
Microsoft.Data.SqlClientdriver and its companion packages share a single aligned version. The7.1.0GA release continues this alignment; the following packages ship together as7.1.0:
Microsoft.Data.SqlClientMicrosoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProviderMicrosoft.Data.SqlClient.Extensions.AzureMicrosoft.Data.SqlClient.Extensions.AbstractionsMicrosoft.Data.SqlClient.Internal.Logging(
Microsoft.SqlServer.Servercontinues to version independently and remains at1.0.0.)Applications must reference the same versions of
Microsoft.Data.SqlClientand its extensions for best compatibility. In particular, applications that referenceMicrosoft.Data.SqlClient.Extensions.Azuremust upgrade it to7.1.0when upgradingMicrosoft.Data.SqlClientto7.1.0.Compatibility guarantee: All aligned assemblies ship with
FileVersion 7.1.0.xandAssemblyVersion 7.0.0.0. TheAssemblyVersionis unchanged from 7.0.2, so upgrading from7.0.2,7.0.3, or any7.1preview to7.1.0does not require any new .NET Framework strong-name binding redirects. Applications upgrading from7.0.0or7.0.1should note thatExtensions.Azure,Extensions.Abstractions, andInternal.Loggingraised theirAssemblyVersionfrom1.0.0.0to7.0.0.0in 7.0.2; see those release notes for the one-time .NET Framework impact.
Companion package release notes
- Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 7.1.0
- Microsoft.Data.SqlClient.Extensions.Azure 7.1.0
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.0
- Microsoft.Data.SqlClient.Internal.Logging 7.1.0
Changes Since 7.1.0-preview3
Added
Application Identity in the USERAGENT Payload
What Changed:
- Added a
RegisteredApplicationenum and a matchingSqlConnection.RegisteredApplicationproperty that let a library or tool identify itself to SQL Server through version 2 of the TDS USERAGENT feature extension. The payload also carries a new driver-owned 64-bit Driver Properties flag field; bit 0 reports whether connection pool V2 is enabled for the process. Both fields are emitted as unpadded uppercase hexadecimal. (#3201, #4632)
Who Benefits:
- Middleware and tooling built on top of the driver — Entity Framework Core, Semantic Kernel, SQL Server Management Studio, SqlPackage, Data API Builder, and similar — can be distinguished in server-side telemetry without the driver accepting arbitrary user-supplied user-agent text. This originated as a request from the Entity Framework Core team.
- Service operators gain a more accurate picture of which client stacks are connecting, which helps when diagnosing workload-specific behavior.
Impact:
- Purely additive from the application's perspective: a newly created physical connection whose
RegisteredApplicationis unset reportsUnknown(0). On the wire the field itself is new — USERAGENT payload v1 carried no application identifier, while v2 always emits one. - Set the property before calling
OpenorOpenAsync. Assigning it while the connection is connecting or open throwsInvalidOperationException.
using var connection = new SqlConnection(connectionString);
connection.RegisteredApplication = RegisteredApplication.EntityFrameworkCore;
await connection.OpenAsync();- The enum is
ushort-backed and marked[CLSCompliant(false)]. Values are partitioned by range:0x0001–0x7FFFfor Microsoft-defined large-scale applications,0x8000–0xBFFFfor small-scale use, and0xC000–0xFFFFfor public/developer use. Applications that are not yet registered can cast an unassigned value from the appropriate range. - Application identity is client-supplied telemetry and must never be used for authorization or any other security decision.
- The value is not part of the connection pool key. A pooled physical connection reports the application that originally created it, and background
Min Pool Sizeconnections reportUnknown. Cloned connections preserve the value.
Changed
TransparentNetworkIPResolution Is Now Obsolete
What Changed:
SqlConnectionStringBuilder.TransparentNetworkIPResolutionis now marked[Obsolete]. The obsoletion message directs callers toMultiSubnetFailoverand notes that Transparent Network IP Resolution (TNIR) is a .NET Framework-only feature. (#4494, #4576)
Who Benefits:
- Applications still relying on TNIR get a compile-time signal to move to
MultiSubnetFailover, which addresses the same "connect quickly across multiple DNS-resolved addresses" goal, works consistently on every supported target framework, and is the documented strategy for Always On availability group listeners.
Impact:
- No runtime behavior change. TNIR still defaults to
trueon .NET Framework, andMultiSubnetFailoverstill defaults tofalse. The property remains .NET Framework-only and is not exposed on modern .NET, where a connection string containing theTransparent Network IP Resolutionkeyword still throwsNotSupportedException. No new AppContext switches were introduced. - The only visible effect is a new
CS0618build warning for code that references the property. Suppress it, or migrate toMultiSubnetFailover, at your own pace. Flipping the TNIR andMultiSubnetFailoverdefaults is deferred to a future major version.
Other changes
- Updated
Microsoft.Data.SqlClient.SNIandMicrosoft.Data.SqlClient.SNI.runtimeto v7.1.0 (was v7.1.0-preview3.26226.3). (#4698) - Unified the exception message raised when conflicting token-based and SSPI authentication properties are set on the same
SqlConnection, and documented the complete set of properties that conflict withAccessToken. (#4629) - Documentation corrections:
- Rewrote the
SqlDataRecordandSqlMetaDatadocumentation, which incorrectly described the SQL CLR-onlySqlContextandSqlPipetypes, and clarified whetherSqlDataRecordinstances can be reused. (#1805, #4440) - Corrected the LCID 1033 sample comment to use the official Windows locale name
English (United States). (#4646)
- Rewrote the
Fixed
- Fixed a pooled connection being returned to the pool in a broken state after a
TransactionScoperollback — for example, when distributed transaction promotion fails on .NET 8+ where implicit distributed transactions are disabled by default. A subsequentOpen()succeeded butBeginTransaction()threwInvalidOperationException("the connection has been broken"). Connection reset now preserves the transaction when the pooled connection is either a delegated transaction root or enlisted in a transaction, instead of only the latter. (#4001, #4557) - Fixed
GetSchema("DataTypes")never reporting the SQL Server 2025jsontype against Azure SQL. The row was filtered by a string comparison against a minimum server version of17.00.000.0, which Azure SQL can never satisfy because it always reports12.00.xxxx. The decision now uses thejsonsupport flag negotiated through the TDSFEATUREEXTACKtoken, which is accurate on both Azure SQL and on-premises SQL Server 2025+. (#4592, #4682) - Fixed a malformed UNC pipe path being composed for IPv6 literal server names over Named Pipes in managed SNI (for example
Server=np:::1,Server=np:[::1], orServer=\\::1\pipe\sql\query). A UNC path component may not contain a colon, and handing such a path to the OS could trigger an access violation inside LSASS on Windows, forcing a reboot. IPv6 literals are now transcribed to their.ipv6-literal.netform as defined by MS-DTYP 2.2.57, and a colon-bearing host with no valid IPv6 interpretation now fails with the standard invalid-connection-string error. Colon-free host names, LocalDB,localhost,., and IPv6 over TCP are unaffected. (net8.0/net9.0 only — this is the managed SNI counterpart to the native SNI fix) (#4523, #4558) - Fixed configurable retry logic installing a permanent, process-wide assem...
Stable Release v7.0.3
This update brings the following changes since the 7.0.2 release:
The core driver and its companion packages ship together as version 7.0.3. Update the companion packages you use alongside the driver to 7.0.3. Assembly versions remain 7.0.0.0, unchanged from 7.0.2.
Companion package release notes
- Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 7.0.3
- Microsoft.Data.SqlClient.Extensions.Azure 7.0.3 — includes the Entra ID authority parsing fix for Dataverse/Dynamics 365 connections.
- Microsoft.Data.SqlClient.Extensions.Abstractions 7.0.3
- Microsoft.Data.SqlClient.Internal.Logging 7.0.3
Changed
- Updated the
Microsoft.Data.SqlClient.SNIandMicrosoft.Data.SqlClient.SNI.runtimedependencies to 6.0.3 (was 6.0.2).
(#4599)
Fixed
-
Fixed a
SqlBulkCopyregression in environments where the application login cannot readsys.all_columns. Bulk copy now falls back to the earlier column-discovery behavior when that permission is unavailable. Support for hidden columns and SQL Graph column aliases still requires access to the metadata view.
(#4370, #4306, #4402) -
Fixed a memory-allocation regression in connection and command operations caused by formatting diagnostic strings even when tracing was disabled. Also corrected trace messages that reported an incorrect object ID or could throw
FormatExceptionwhen traced values contained braces.
(#4528, #4533) -
Fixed
ServerCertificatevalidation on the managed SNI path so the configured certificate is compared against the server certificate even when the server certificate passes chain and host-name validation. When certificate validation is enabled, a missing, unreadable, or invalid certificate file, a certificate mismatch, or a missing server certificate now causes the TLS handshake to fail instead of bypassing the configured certificate check. (net8.0/net9.0 only)
(#4445, #4583) -
Fixed Always Encrypted VSM/HGS enclave attestation to verify that the enclave public key used to establish a session matches the key committed to by the signed attestation report. Missing, malformed, or mismatched key-binding data now causes attestation to fail before the session secret is derived.
(#4532, #4553) -
Fixed
SqlConnection.AccessTokenCallbacknot disabling Transparent Network IP Resolution by default, making it consistent withSqlConnection.AccessToken. An explicitly configuredTransparentNetworkIPResolutionconnection-string value still takes precedence. (net462 only)
(#4520, #4561) -
Fixed authentication state handling so clearing
SqlConnection.AccessToken,AccessTokenCallback, orSspiContextProviderpreserves the other authentication values in the connection pool key. Cloning a connection or updating its credential also preserves itsSspiContextProvider. Combining a non-nullSspiContextProviderwithAccessTokenorAccessTokenCallbacknow throwsInvalidOperationExceptioninstead of silently discarding authentication state; applications must use one authentication mechanism at a time.
(#4520, #4561, #4644) -
Fixed configurable retry logic installing a permanent, process-wide assembly-resolution handler that could interfere with unrelated assembly loading. The handler is now active only while an explicitly configured custom retry provider is resolved and constructed, and probes
AppContext.BaseDirectoryinstead of the current working directory. Place custom retry assemblies in the application base directory; dependencies loaded after provider construction must be resolvable through normal application dependency resolution or an application-provided handler. (net8.0/net9.0 only)
(#2214, #4547, #4663)
Contributors
We thank the following public contributors. Their efforts toward this project are very much appreciated.
Target Platform Support
- .NET Framework 4.6.2+ (Windows x86, Windows x64, Windows ARM64)
- .NET 8.0+ (Windows x86, Windows x64, Windows ARM, Windows ARM64, Linux, macOS)
Full details: release-notes/7.0/7.0.3.md
Stable Release v6.1.7
This update brings the following changes since the 6.1.6 release:
Changed
- Updated the
Microsoft.Data.SqlClient.SNIandMicrosoft.Data.SqlClient.SNI.runtimedependencies to 6.0.3 (was 6.0.2).
(#4598)
Fixed
-
Fixed
ServerCertificatevalidation on the managed SNI path so the configured certificate is compared against the server certificate even when the server certificate passes chain and host-name validation. When certificate validation is enabled, a missing, unreadable, or invalid certificate file, a certificate mismatch, or a missing server certificate now causes the TLS handshake to fail instead of bypassing the configured certificate check. (net8.0/net9.0 only)
(#4445, #4584) -
Fixed Always Encrypted VSM/HGS enclave attestation to verify that the enclave public key used to establish a session matches the key committed to by the signed attestation report. Missing, malformed, or mismatched key-binding data now causes attestation to fail before the session secret is derived.
(#4532, #4552) -
Fixed
SqlConnection.AccessTokenCallbacknot disabling Transparent Network IP Resolution by default, making it consistent withSqlConnection.AccessToken. An explicitly configuredTransparentNetworkIPResolutionconnection-string value still takes precedence. (net462 only)
(#4520, #4560) -
Fixed token authentication state handling so clearing
SqlConnection.AccessTokenpreserves an existingAccessTokenCallbackin the connection pool key, and clearingAccessTokenCallbackpreserves an existingAccessToken. Callback-based authentication now also follows the same prelogin server-certificate validation rules as an explicitly supplied access token.
(#4520, #4560) -
Fixed configurable retry logic installing a permanent, process-wide assembly-resolution handler that could interfere with unrelated assembly loading. The handler is now active only while an explicitly configured custom retry provider is resolved and constructed, and probes
AppContext.BaseDirectoryinstead of the current working directory. Place custom retry assemblies in the application base directory; dependencies loaded after provider construction must be resolvable through normal application dependency resolution or an application-provided handler. (net8.0/net9.0 only)
(#2214, #4547, #4664)
Target Platform Support
- .NET Framework 4.6.2+ (Windows x86, Windows x64, Windows ARM64)
- .NET 8.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)
- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Linux, macOS)
Full details: release-notes/6.1/6.1.7.md
Preview Release v7.1.0-preview3
This update brings the following changes since the 7.1.0-preview2 release.
Package version alignment: The
Microsoft.Data.SqlClientdriver and its companion packages continue the aligned versioning introduced in 7.0.2. All five packages listed below ship together as7.1.0-preview3. (Microsoft.SqlServer.Servercontinues to version independently and remains at1.0.0.) Applications that referenceMicrosoft.Data.SqlClient.Extensions.Azuremust upgrade it to7.1.0-preview3when upgradingMicrosoft.Data.SqlClient.
Compatibility guarantee: All aligned assemblies ship with
FileVersion 7.1.0.xandAssemblyVersion 7.0.0.0— unchanged from 7.0.2 — so upgrading from7.0.2to7.1.0-preview3does not require any new .NET Framework strong-name binding redirects.
Packages in this release
Microsoft.Data.SqlClient 7.1.0-preview3
Added
- Asynchronous key store provider APIs for Always Encrypted — four
virtualmethods onSqlColumnEncryptionKeyStoreProviderwithCancellationTokensupport. Purely additive; defaults delegate to the synchronous methods, so existing providers are unaffected (#3672, #3673) - Connection Pool V2 nears parity with the default pool (opt-in via
Switch.Microsoft.Data.SqlClient.UseConnectionPoolV2):- Transaction support (#4487)
- Broken-connection replacement during command execution (#4429)
- Background warmup to
Min Pool Sizeand automatic replenishment (#4452) - Idle pruning driven by
Connection Idle Timeout(#4463) - Optional
ConcurrencyLimiterrate limiting for new physical connections (#4395, #4396) - Leaked connection reclamation, including the previously always-zero
number-of-reclaimed-connectionscounter (#4529) - Metrics and tracing parity with the default pool (#4504)
Changed
- Single cross-platform build — Windows-only native SNI types now trim cleanly on Linux and macOS. Package structure and contents unchanged (#4207, #4239, #4465, #4474)
- Async read-path allocations restored to baseline via
PacketDatanode reuse —ExecuteReaderAsyncgoes from +120.9% to +0.1% against 6.1.6 (#4536) SqlBulkCopyskips graph alias mapping when no graph pseudo-columns are present, recovering a regression from #3677 (#4535)- No formatted trace string is allocated when
SqlClientEventSourcetracing is disabled, recovering a memory regression against 6.1.6. Trace output unchanged (#4528) net9.0dependencies moved to9.0.18;System.Threading.RateLimitingadded to packaged metadata. Other targets keep their8.0.xpins (#4507)Microsoft.Data.SqlClient.SNIand.SNI.runtimeupdated to7.1.0-preview3.26226.3(#4564)
Fixed
- Always Encrypted VSM/HGS attestation now verifies the enclave public key is bound to the signed report, using a fixed-time
SHA-256comparison againstEnclaveData(#4532) SqlConnectionFactoryno longer wakes the process every 30 seconds when no pools exist — including withPooling=Falseand afterClearAllPools()(#1881, #4479)- Connection pool performance counters affecting the default pool as well as pool V2 —
active-soft-connectsandnumber-of-active-connectionscould go negative after a failed activation, and several gauges drifted upward permanently after a broken connection was replaced (#4504) OverflowExceptionwhen sending largedecimalvalues with explicitPrecisionandScale, which primarily affected Always Encrypted (#1655, #4443)- TDS stream error when passing a
DateOnlyvalue withSqlDbType.Variant(net8.0/net9.0) (#3953, #4294) DateOnlyin table-valued parametersql_variantcolumns sent asdatetimeinstead ofdate, which overflowed for values valid asdate(net8.0/net9.0) (#3934, #4439)ServerCertificatekeyword ignored when the platform reported no TLS policy errors. It is now always compared, and an unloadable certificate fails closed withSSLCertificateAuthenticationExceptioninstead of silently falling back to host-name validation (#4445)SqlConnection.AccessTokenCallbacknot disabling TNIR by default, plus pool-key construction andSspiContextProviderexclusivity with token auth (net462 for the TNIR behavior) (#4520)- Fatal exceptions such as
OutOfMemoryExceptioncaptured into faultedTasks across severalSqlBulkCopy,SqlDataReader, andSqlCommandasync entry points (#4437) - Entra ID authentication failing against multi-segment authorities such as the Dataverse / Dynamics 365 TDS endpoint. Ships in
Microsoft.Data.SqlClient.Extensions.Azure(#4496, #4521)
Full details: release-notes/7.1/7.1.0-preview3.md
Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 7.1.0-preview3
Added
SqlColumnEncryptionAzureKeyVaultProvideroverrides the four asynchronous key store provider methods introduced in #3673, calling the Azure SDK's own async APIs and flowing the suppliedCancellationToken(#4540)- Concurrent cache misses for the same key collapse into a single Key Vault request. The gate is only awaited, so no thread blocks, and misses for different keys still proceed in parallel (#4540)
Fixed
- The 2000-entry column master key signature cache could stop compacting and grow unbounded —
LocalCache.GetOrCreatecompacted only onCount == maxSize, an equality test that concurrency could step past. It now compacts onCount >= maxSize(#4540) - Concurrent callers no longer create duplicate
CryptographyClientinstances for the same key (#4540)
Behavior change:
VerifyColumnMasterKeyMetadataandVerifyColumnMasterKeyMetadataAsyncnow reject a null or emptysignaturewithArgumentNullException/ArgumentExceptioninstead of passing it through to the Azure SDK. In-product callers are unaffected.
Runtime requirement: this version requires
Microsoft.Data.SqlClient7.1.0-preview3 or later at runtime, because the overridden methods only exist on the 7.1 base class. The NuGet dependency floor covers restore, but downgrading the driver below 7.1 at runtime produces aTypeLoadException.
Full details: release-notes/add-ons/AzureKeyVaultProvider/7.1/7.1.0-preview3.md
Microsoft.Data.SqlClient.Extensions.Azure 7.1.0-preview3
Fixed
- Entra ID tenant parsing for multi-segment authorities — the tenant is now taken from the first path segment rather than the last, so an OAuth v1 style authority such as
.../{tenantId}/oauth2/authorizeno longer yields the literal tenant id"authorize". Unparseable authorities raise a clearAuthenticationException, and provider errors are no longer re-wrapped as "Unexpected error". Bare authorities from Azure SQL, Fabric, and Synapse are unaffected (#4496, #4521)
Full details: release-notes/Extensions/Azure/7.1/7.1.0-preview3.md
Microsoft.Data.SqlClient.Extensions.Abstractions 7.1.0-preview3
- No functional or API changes; aligned version bump only.
Full details: release-notes/Extensions/Abstractions/7.1/7.1.0-preview3.md
Microsoft.Data.SqlClient.Internal.Logging 7.1.0-preview3
- Internal-use-only package. No functional or API changes; aligned version bump only.
Full details: [release-notes/Internal/Logging/7.1/7.1.0-preview3.md](https://github.com/dotnet/SqlClient/blob/main/release-notes/I...