Skip to content

Preview Release v7.0.0-preview2

Pre-release
Pre-release

Choose a tag to compare

@benrr101 benrr101 released this 17 Oct 19:21
· 161 commits to main since this release
fd2aac8

This update brings the following changes since the 7.0.0-preview1 release:

Bug Fixes

  • Fixed a debug assertion in connection pool (no impact to production code) (#3587)
  • Prevent uninitialized performance counters escaping CreatePerformanceCounters (#3623)
  • Fix SetProvider to return immediately if user-defined authentication provider found (#3620)
  • Allow SqlBulkCopy to operate on hidden columns (#3590)
  • Fix connection pool concurrency issue (#3632)

Added

App Context Switch for Ignoring Server-Provided Failover Partner

What Changed:

  • A new app context switch Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner was introduced to let the client ignore server-provided failover partner info in Basic Availability Groups (BAGs). When the switch is enabled, only the failover partner specified in the connection string is used; server-supplied partner values are skipped. This context switch was introduced in PR #3625.

Who Benefits:

  • Applications connecting to SQL Server BAGs using TCP and custom ports, especially where the server's provided partner name lacks the protocol, host, or port. This avoids connection failures when the server-provided partner is incompatible or incomplete.
  • Teams who manage availability groups and rely on client-side control of failover behavior in heterogeneous networking environments.

Impact:

  • If your environment might be affected (i.e., you operate a BAG with custom ports, or have experienced failures after failover), you can enable the new switch in your application:
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner", true);
  • Then, ensure your connection string includes your preferred failover partner (with correct tcp:host,port) so that the client uses that instead of the server's suggestion.
  • Without enabling this, by default, the client continues to prefer the server-provided partner, maintaining backwards compatibility.

Other Additions

  • Add app context switch for enabling asynchronous multi-packet improvements (#3605)

Changed

Deprecation of SqlAuthenticationMethod.ActiveDirectoryPassword

What Changed:

  • Username/Password authentication for Microsoft Entra (formerly Active Directory) has been deprecated. SqlAuthenticationMethod.ActiveDirectoryPassword is now marked as [Obsolete]. This change occurred in PR #3671

Who benefits:

Impact:

  • If you use Authentication=Active Directory Password, migrate to a supported alternative:
    • Interactive/MFA: Active Directory Interactive
    • Service to service: Active Directory Service Principal (client secret/certificate)
    • Cloud workloads: Active Directory Managed Identity or Active Directory Workload Identity
    • Headless/Developer flows: Active Directory Device Code Flow or Active Directory Default
  • See https://learn.microsoft.com/en-us/sql/connect/ado-net/sql/azure-active-directory-authentication for more information on authentication to SQL Server using Microsoft Entra.

Other changes

  • Improve performance in SqlStatistics by using Environment.TickCount for calculating execution timing (#3609)
  • Improve performance in Always Encrypted scenarios by using lower-allocation primitives (#3612)
  • Various test improvements. (#3423, #3488, #3624, #3638, #3642, #3678, #3690)
  • Codebase merge project and related cleanup. (#3555, #3603, #3608, #3611, #3619, #3622, #3630, #3631, #3634, #3637, #3644, #3647, #3655)
  • Code health improvements. (#3645)
  • Internal infrastructure improvements. (#3659, #3692, #3695)
  • Updated Dependencies(#3638):
    • Updated Azure.Core to v1.49.0
    • Updated Azure.Identity to v1.16.0
    • Updated Azure.Security.KeyVault.Keys v4.8.0 (AKV provider)
    • Updated Microsoft.Bcl.Cryptography to v9.0.9 (net9)
    • Updated Microsoft.Extensions.Caching.Memory to v9.0.9 (net9)
    • Updated Microsoft.IdentityModel.JsonWebTokens to v8.14.0
    • Updated Microsoft.IdentityModel.Protocols.OpenIdConnect to v8.14.0
    • Updated System.Buffers to v4.6.1 (net462)
    • Updated System.Memory to v4.6.3 (net462)
    • Updated System.Configuration.ConfigurationManager to v9.0.9 (net9)
    • Updated System.Security.Cryptography.Pkcs to v9.0.9 (net9)
    • Updated System.Text.Json to v8.0.6 (net8), v9.0.9 (net9)

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)

Dependencies

.NET Standard 2.0

  • Azure.Core 1.49.0
  • Azure.Identity 1.16.0
  • Microsoft.Bcl.Cryptography 9.0.9
  • Microsoft.Data.SqlClient.SNI.runtime 6.0.2
  • Microsoft.Extensions.Caching.Memory 9.0.9
  • Microsoft.IdentityModel.JsonWebTokens 8.14.0
  • Microsoft.IdentityModel.Protocols.OpenIdConnect 8.14.0
  • Microsoft.SqlServer.Server 1.0.0
  • System.Configuration.ConfigurationManager 9.0.9
  • System.Security.Cryptography.Pkcs 9.0.5
  • System.Text.Json 9.0.9

.NET Framework 4.6.2+

  • Azure.Core 1.49.0
  • Azure.Identity 1.16.0
  • Microsoft.Bcl.Cryptography 8.0.0
  • Microsoft.Data.SqlClient.SNI 6.0.2
  • Microsoft.Extensions.Caching.Memory 8.0.1
  • Microsoft.IdentityModel.JsonWebTokens 8.14.0
  • Microsoft.IdentityModel.Protocols.OpenIdConnect 7.7.1
  • System.Buffers 4.6.1
  • System.Data.Common 4.3.0
  • System.Diagnostics.DiagnosticSource 8.0.1
  • System.Memory 4.6.3
  • System.Security.Cryptography.Pkcs 8.0.1
  • System.Text.Encodings.Web 8.0.0
  • System.Text.Json 8.0.6
  • System.ValueTuple 4.6.1

.NET 8.0

  • Azure.Core 1.49.0
  • Azure.Identity 1.16.0
  • Microsoft.Bcl.Cryptography 9.0.9
  • Microsoft.Data.SqlClient.SNI.runtime 6.0.2
  • Microsoft.Extensions.Caching.Memory 9.0.9
  • Microsoft.IdentityModel.JsonWebTokens 8.14.0
  • Microsoft.IdentityModel.Protocols.OpenIdConnect 8.14.0
  • Microsoft.SqlServer.Server 1.0.0
  • System.Configuration.ConfigurationManager 9.0.9
  • System.Security.Cryptography.Pkcs 9.0.5
  • System.Text.Json 9.0.9

.NET 9.0

  • Azure.Core 1.49.0
  • Azure.Identity 1.16.0
  • Microsoft.Bcl.Cryptography 9.0.9
  • Microsoft.Data.SqlClient.SNI.runtime 6.0.2
  • Microsoft.Extensions.Caching.Memory 9.0.9
  • Microsoft.IdentityModel.JsonWebTokens 8.14.0
  • Microsoft.IdentityModel.Protocols.OpenIdConnect 8.14.0
  • Microsoft.SqlServer.Server 1.0.0
  • System.Configuration.ConfigurationManager 9.0.9
  • System.Security.Cryptography.Pkcs 9.0.9
  • System.Text.Json 9.0.9