This update includes the following changes since the 6.1.2 release:
Added
App Context Switch for Ignoring Server-Provided Failover Partner
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 #3702.
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.
Fixed
- Fixed an issue to ensure reliable metrics initialization during startup, preventing missed telemetry when EventSource is enabled early. (#3718)
Target Platform Support
- .NET Framework 4.6.2+ (Windows ARM64, Windows x86, Windows x64)
- .NET 8.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS)
Dependencies
.NET Framework 4.6.2+
- Azure.Core 1.47.1
- Azure.Identity 1.14.2
- Microsoft.Bcl.Cryptography 8.0.0
- Microsoft.Data.SqlClient.SNI 6.0.2
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.IdentityModel.JsonWebTokens 7.7.1
- Microsoft.IdentityModel.Protocols.OpenIdConnect 7.7.1
- System.Buffers 4.5.1
- System.Data.Common 4.3.0
- System.Security.Cryptography.Pkcs 8.0.1
- System.Text.Encodings.Web 8.0.0
- System.Text.Json 8.0.5
.NET 8.0
- Azure.Core 1.47.1
- Azure.Identity 1.14.2
- Microsoft.Bcl.Cryptography 8.0.0
- Microsoft.Data.SqlClient.SNI.runtime 6.0.2
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.IdentityModel.JsonWebTokens 7.7.1
- Microsoft.IdentityModel.Protocols.OpenIdConnect 7.7.1
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 8.0.1
- System.Security.Cryptography.Pkcs 8.0.1
- System.Text.Json 8.0.5
.NET 9.0
- Azure.Core 1.47.1
- Azure.Identity 1.14.2
- Microsoft.Bcl.Cryptography 9.0.5
- Microsoft.Data.SqlClient.SNI.runtime 6.0.2
- Microsoft.Extensions.Caching.Memory 9.0.5
- Microsoft.IdentityModel.JsonWebTokens 7.7.1
- Microsoft.IdentityModel.Protocols.OpenIdConnect 7.7.1
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 9.0.5
- System.Security.Cryptography.Pkcs 9.0.5
- System.Text.Json 9.0.5
.NET Standard 2.0
- Azure.Core 1.47.1
- Azure.Identity 1.14.2
- Microsoft.Bcl.Cryptography 8.0.0
- Microsoft.Data.SqlClient.SNI.runtime 6.0.2
- Microsoft.Extensions.Caching.Memory 8.0.1
- Microsoft.IdentityModel.JsonWebTokens 7.7.1
- Microsoft.IdentityModel.Protocols.OpenIdConnect 7.7.1
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 8.0.1
- System.Security.Cryptography.Pkcs 8.0.1
- System.Text.Json 8.0.5