Changes Since 7.0.0-preview1
This update brings the following changes since the 7.0.0-preview1 release:
-
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)
What Changed:
- A new app context switch
Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartnerwas 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.
- Add app context switch for enabling asynchronous multi-packet improvements (#3605)
To enable these improvements, set the following switches in your application:
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.UseCompatibilityAsyncBehaviour", false);
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.UseCompatibilityProcessSni", false);What Changed:
- Username/Password authentication for Microsoft Entra (formerly Active Directory) has been deprecated.
SqlAuthenticationMethod.ActiveDirectoryPasswordis now marked as[Obsolete]. This change occurred in PR #3671
Who benefits:
- Teams moving toward stronger, passwordless or MFA-compliant auth (in line with changes across MSAL/Azure.Identity and Entra MFA enforcement). This aligns Microsoft.Data.SqlClient with Microsoft's direction to avoid username/password (ROPC) flows. See Planning for mandatory multifactor authentication for Azure and other admin portals for more explanation of why this change is being made across Microsoft products/services.
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 IdentityorActive Directory Workload Identity - Headless/Developer flows:
Active Directory Device Code FloworActive Directory Default
- Interactive/MFA:
- See Connect to Azure SQL with Microsoft Entra authentication and SqlClient for more information on authentication to SQL Server using Microsoft Entra.
-
Improve performance in
SqlStatisticsby usingEnvironment.TickCountfor 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)
-
Updated Dependencies (#3638):
- Updated
Azure.Coreto v1.49.0 - Updated
Azure.Identityto v1.16.0 - Updated
Azure.Security.KeyVault.Keysv4.8.0 (AKV provider) - Updated
Microsoft.Bcl.Cryptographyto v9.0.9 (net9) - Updated
Microsoft.Extensions.Caching.Memoryto v9.0.9 (net9) - Updated
Microsoft.IdentityModel.JsonWebTokensto v8.14.0 - Updated
Microsoft.IdentityModel.Protocols.OpenIdConnectto v8.14.0 - Updated
System.Buffersto v4.6.1 (net462) - Updated
System.Memoryto v4.6.3 (net462) - Updated
System.Configuration.ConfigurationManagerto v9.0.9 (net9) - Updated
System.Security.Cryptography.Pkcsto v9.0.9 (net9) - Updated
System.Text.Jsonto v8.0.6 (net8), v9.0.9 (net9)
- Updated
We thank the following public contributors. Their efforts toward this project are very much appreciated.
- .NET Framework 4.6.2+ (Windows x86, Windows x64, Windows ARM64)
- .NET 8.0+ (Windows x86, Windows x64, Windows ARM, Windows ARM64, Linux, macOS)
- 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
- 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
- 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
- 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