Skip to content

Latest commit

 

History

History
161 lines (127 loc) · 16.4 KB

7.1.0-preview3.md

File metadata and controls

161 lines (127 loc) · 16.4 KB

Release Notes

Preview Release 7.1.0-preview3 - 2026-08-26

This update brings the following changes since the 7.1.0-preview2 release:

Important — package version alignment: Starting with the 7.0.2 release, the Microsoft.Data.SqlClient driver and its companion packages share a single aligned version. Preview 3 of the 7.1 line continues this alignment; the following packages ship together as 7.1.0-preview3:

  • Microsoft.Data.SqlClient
  • Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider
  • Microsoft.Data.SqlClient.Extensions.Azure
  • Microsoft.Data.SqlClient.Extensions.Abstractions
  • Microsoft.Data.SqlClient.Internal.Logging

(Microsoft.SqlServer.Server continues to version independently and remains at 1.0.0.)

Applications must reference the same versions of Microsoft.Data.SqlClient and its extensions for best compatibility. In particular, applications that reference Microsoft.Data.SqlClient.Extensions.Azure must upgrade it to 7.1.0-preview3 when upgrading Microsoft.Data.SqlClient to 7.1.0-preview3.

Compatibility guarantee: All aligned assemblies ship with FileVersion 7.1.0.x and AssemblyVersion 7.0.0.0. The AssemblyVersion is unchanged from 7.0.2, so upgrading from 7.0.2 to 7.1.0-preview3 does not require any new .NET Framework strong-name binding redirects.

Added

Asynchronous Key Store Provider APIs for Always Encrypted

What Changed:

  • Added four virtual asynchronous counterparts to the existing synchronous methods on the SqlColumnEncryptionKeyStoreProvider abstract base class: DecryptColumnEncryptionKeyAsync, EncryptColumnEncryptionKeyAsync, SignColumnMasterKeyMetadataAsync, and VerifyColumnMasterKeyMetadataAsync. Each takes an optional CancellationToken. The default implementations delegate to the existing synchronous methods, so providers that do not override them continue to work unchanged. (#3672, #3673)

Who Benefits:

  • Authors of custom column encryption key store providers — particularly those backed by network-bound key stores such as HSMs or cloud key vaults — can now implement genuinely asynchronous key operations, and callers that resolve column encryption keys directly through a provider can await them instead of blocking a thread on synchronous I/O.

Impact:

  • Purely additive. Because the new methods are virtual with a synchronous fallback, existing providers compile and run without modification.
  • Introduced, but not yet consumed by the driver. These APIs are added to the public surface in this release so that provider authors can begin implementing them, but Microsoft.Data.SqlClient does not call them yet — the driver's own column encryption key resolution path (SqlSecurityUtility) still invokes the synchronous provider methods on both the synchronous and asynchronous command paths. Overriding the asynchronous methods therefore does not by itself remove blocking key-store I/O from ExecuteReaderAsync and friends. A future release will enable their use from the driver's own asynchronous APIs.
  • The in-box SqlColumnEncryptionAzureKeyVaultProvider overrides all four methods in this release. See the AzureKeyVaultProvider 7.1.0-preview3 release notes. (#4540)

Connection Pool V2 Feature Completeness

What Changed:

  • Substantially expanded ChannelDbConnectionPool, the opt-in pool implementation gated behind the Switch.Microsoft.Data.SqlClient.UseConnectionPoolV2 AppContext switch, bringing it to parity with the default WaitHandleDbConnectionPool:
    • Transaction support — implemented PutObjectFromTransactedPool and TransactionEnded (previously NotImplementedException), and reworked connection return to mirror the reference pool's deactivate-then-route behavior. (#4487)
    • Connection replacement — implemented replacement of broken connections during command execution, with atomic slot replacement in ConnectionPoolSlots. (#4429)
    • Background warmup and replenishment — the pool now pre-creates connections up to Min Pool Size on startup and replenishes automatically whenever it drops below the minimum. (#4452)
    • Idle pruning — the pruning window is now derived from the Connection Idle Timeout value rather than a hard-coded interval. Defaults are unchanged. (#4463)
    • Connection-creation rate limiting — an optional ConcurrencyLimiter can throttle new physical connection creation; when a permit is denied the caller waits for an existing connection instead of forcing another open. (#4395, #4396)
    • Leaked connection reclamation — the pool now reclaims leaked connections (connections whose owning SqlConnection was garbage collected without being closed) both inline on the requesting thread and, while callers are waiting, from a demand-driven PoolReclaimer timer. The number-of-reclaimed-connections counter, which previously always read zero under pool V2, is now emitted. (#4529)
    • Metrics and tracing parity — the pool now emits the same pooled/free connection and soft/hard connect/disconnect counters as the default pool, and traces at comparable fidelity. (#4504)

Who Benefits:

  • Applications evaluating the V2 connection pool can now exercise transaction-enlisted workloads, broken-connection recovery, leaked-connection reclamation, and pool warmup, and can observe the pool through the existing performance counters and EventSource traces.

Impact:

  • No change to default behavior. ChannelDbConnectionPool is used only when Switch.Microsoft.Data.SqlClient.UseConnectionPoolV2 is enabled; the default pool remains WaitHandleDbConnectionPool.
  • This work also surfaced connection pool performance counter defects that affect the default pool, which are listed under Fixed below.

Changed

  • Windows-only native SNI types are now removed cleanly by the IL trimmer on Linux and macOS, and LocalAppContextSwitches.UseManagedNetworking is now substituted for a constant (an ILLink.Substitutions.xml naming defect previously prevented this). The driver now builds a single OS-agnostic assembly for all platforms; the structure and contents of the NuGet package are unchanged. (#4207, #4239, #4465, #4474)
  • Reduced managed allocations in the async read path by restoring reuse of PacketData linked-list nodes via a bounded free list on StateSnapshot, recovering an allocation regression against the 6.1.6 baseline. This applies to the default async read path and is not gated behind any AppContext switch; SqlCommand/ExecuteReaderAsync returns from +120.9% allocated against the 6.1.6 baseline to +0.1%. (#4536)
  • SqlBulkCopy no longer builds SQL Graph column alias mapping tables when the source and destination tables contain no graph pseudo-columns ($edge_id, $to_id, $from_id, $node_id), recovering a bulk copy performance regression introduced with graph column alias support in #3677. Graph table bulk copy behavior is unchanged. (#4535)
  • Operations no longer allocate a formatted trace string when SqlClientEventSource tracing is disabled, recovering a memory regression against the 6.1.6 baseline. Trace output with tracing enabled is unchanged. (#4528)
  • Updated centrally managed dependency versions for the net9.0 target framework to 9.0.18, and added System.Threading.RateLimiting to the packaged dependency metadata. Non-net9.0 targets keep their existing 8.0.x pins. (#4507)
  • Updated the Microsoft.Data.SqlClient.SNI and Microsoft.Data.SqlClient.SNI.runtime dependencies to 7.1.0-preview3.26226.3. (#4564)

Fixed

  • Fixed Always Encrypted VSM/HGS enclave attestation not verifying that the enclave public key used to establish the session matches the key committed to by the signed attestation report. The provider now compares SHA-256(enclave public key) against the report's EnclaveData using a fixed-time comparison, and rejects attestation when the data is missing, malformed, or mismatched. (#4532)
  • Fixed a SqlConnectionFactory timer that woke the process every 30 seconds for the lifetime of the application even when no connection pools existed — including with Pooling=False and after ClearAllPools(). The pruning timer is now armed on demand and disarmed once there is nothing left to prune. A missing .NET Framework unload hook was also added. (#1881, #4479)
  • Fixed connection pool performance counter defects affecting the default pool as well as pool V2. active-soft-connects and number-of-active-connections could go negative after a failed connection activation, and active-soft-connects, active-hard-connections, and number-of-pooled-connections drifted upward permanently after a broken connection was replaced. Because these are gauges, an unmatched increment or decrement never recovered for the lifetime of the process. (#4504)
  • Fixed OverflowException when sending large decimal values (for example decimal.MaxValue) as a parameter with explicit Precision and Scale, which primarily affected Always Encrypted scenarios where both must always be set. (#1655, #4443)
  • Fixed a TDS stream error when passing a DateOnly value as a parameter with SqlDbType.Variant; the required sql_variant write paths were missing. (net8.0/net9.0 only) (#3953, #4294)
  • Fixed DateOnly values written to a sql_variant column of a table-valued parameter being sent as datetime instead of date. Besides being incorrect, this caused an overflow for DateOnly values that are valid for date but out of range for datetime. Reading continues to return DateTime instances by default, for backwards compatibility. (net8.0/net9.0 only — .NET Framework has no DateOnly type) (#3934, #4439)
  • Fixed the ServerCertificate connection-string keyword not being honored when the platform reported no TLS policy errors. The configured certificate is now always compared against the certificate presented by the server, matching the documented exact-match semantic. If the configured file cannot be loaded or parsed, the connection now fails closed with an SSLCertificateAuthenticationException naming the path, rather than silently falling back to host-name validation. A null server certificate now throws AuthenticationException instead of NullReferenceException. Connections that do not set ServerCertificate, and those whose configured certificate matches, are unaffected. (#4445)
  • Fixed SqlConnection.AccessTokenCallback not disabling Transparent Network IP Resolution by default, unlike SqlConnection.AccessToken. Also fixed a related defect in how the authentication setters build the connection pool key, and made SspiContextProvider mutually exclusive with token-based authentication. (net462 only for the TNIR behavior) (#4520)
  • Fixed several async entry points in SqlBulkCopy, SqlDataReader.InvokeAsyncCall, SqlCommand.Reader, and SqlCommand.Xml that captured fatal exceptions such as OutOfMemoryException into faulted Tasks instead of letting them propagate. (#4437)
  • Fixed Authentication=Active Directory Service Principal (and the interactive, password, integrated, and device-code flows) failing against endpoints such as the Dataverse / Dynamics 365 TDS endpoint, which return a multi-segment Entra ID authority (https://login.microsoftonline.com/{tenantId}/oauth2/authorize) in the TDS FEDAUTHINFO token. The tenant id is now taken from the first path segment of the authority instead of the last. This fix ships in Microsoft.Data.SqlClient.Extensions.Azure; see its 7.1.0-preview3 release notes. (#4496, #4521)

Companion package release notes

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.0-preview3
  • Microsoft.Data.SqlClient.Internal.Logging 7.1.0-preview3
  • Microsoft.Data.SqlClient.SNI.runtime 7.1.0-preview3.26226.3
  • 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.0-preview3
  • Microsoft.Data.SqlClient.Internal.Logging 7.1.0-preview3
  • Microsoft.Data.SqlClient.SNI.runtime 7.1.0-preview3.26226.3
  • 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.0-preview3
  • Microsoft.Data.SqlClient.Internal.Logging 7.1.0-preview3
  • Microsoft.Data.SqlClient.SNI.runtime 7.1.0-preview3.26226.3
  • 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.0-preview3
  • Microsoft.Data.SqlClient.Internal.Logging 7.1.0-preview3
  • Microsoft.Data.SqlClient.SNI 7.1.0-preview3.26226.3
  • 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