Skip to content

Commit b0e2b31

Browse files
Merge pull request #36889 from cheenamalhotra/dev/cheena/mds-updates
MDS v7.0 release updates
2 parents 398041b + b429f0b commit b0e2b31

6 files changed

Lines changed: 417 additions & 46 deletions

docs/connect/ado-net/appcontext-switches.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ title: AppContext switches in SqlClient
33
description: Learn about the AppContext switches available in SqlClient and how to use them to modify some default behaviors.
44
author: cheenamalhotra
55
ms.author: cmalhotra
6-
ms.date: 08/19/2025
6+
ms.date: 03/17/2026
77
ms.service: sql
88
ms.subservice: connectivity
99
ms.topic: concept-article
1010
dev_langs:
1111
- "csharp"
1212
ms.custom: sfi-ropc-nochange
13+
ai-usage: ai-assisted
1314
---
15+
1416
# AppContext switches in SqlClient
1517

1618
[!INCLUDE [dotnet-all](../../includes/products/applies-full/dotnet-all.md)]
@@ -19,6 +21,55 @@ ms.custom: sfi-ropc-nochange
1921

2022
The AppContext class allows SqlClient to provide new functionality while continuing to support callers who depend on the previous behavior. Users can opt out of a change in behavior by setting specific AppContext switches.
2123

24+
## Enable MultiSubnetFailover by default
25+
26+
[!INCLUDE [dotnet-all](../../includes/products/applies-plain/dotnet-all.md)]
27+
28+
(Available starting with version 7.0)
29+
30+
To set `MultiSubnetFailover=true` globally without modifying individual connection strings, you can set the AppContext switch **"Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault"** to `true` at application startup:
31+
32+
```csharp
33+
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault", true);
34+
```
35+
36+
You can also enable this switch in your App.Config:
37+
38+
```xml
39+
<runtime>
40+
<AppContextSwitchOverrides value="Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault=true" />
41+
</runtime>
42+
```
43+
44+
When enabled, all connections behave as if `MultiSubnetFailover=true` is set in the connection string. This switch is disabled by default.
45+
46+
## Enable packet multiplexing for async reads
47+
48+
[!INCLUDE [dotnet-all](../../includes/products/applies-plain/dotnet-all.md)]
49+
50+
(Available starting with version 7.0)
51+
52+
Packet multiplexing improves performance for large async read operations such as `ExecuteReaderAsync` with big result sets, streaming scenarios, or bulk data retrieval. This feature is controlled by two opt-in AppContext switches. Setting both switches to `false` enables the new async processing path:
53+
54+
```csharp
55+
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.UseCompatibilityAsyncBehaviour", false);
56+
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.UseCompatibilityProcessSni", false);
57+
```
58+
59+
By default, both switches are `true`, which preserves the existing (compatible) behavior.
60+
61+
## Enable User Agent feature extension
62+
63+
[!INCLUDE [dotnet-all](../../includes/products/applies-plain/dotnet-all.md)]
64+
65+
(Available starting with version 7.0)
66+
67+
When the AppContext switch **"Switch.Microsoft.Data.SqlClient.EnableUserAgent"** is enabled, the driver sends user agent details to the server as part of the connection. This information assists with troubleshooting and quantifying driver usage by version and operating system. This switch is disabled by default. To enable it, set the AppContext switch to `true` at application startup:
68+
69+
```csharp
70+
AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.EnableUserAgent", true);
71+
```
72+
2273
## Enabling decimal truncation behavior
2374

2475
[!INCLUDE [dotnet-all](../../includes/products/applies-plain/dotnet-all.md)]

docs/connect/ado-net/download-microsoft-sqlclient-data-provider.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Download page for ADO.NET and Microsoft SqlClient Data Provider for
44
author: cheenamalhotra
55
ms.author: cmalhotra
66
ms.reviewer: randolphwest
7-
ms.date: 11/21/2025
7+
ms.date: 03/17/2026
88
ms.service: sql
99
ms.subservice: connectivity
1010
ms.topic: how-to
@@ -25,6 +25,5 @@ For more information about version compatibility and support, see [SQL version c
2525

2626
## Download supported versions of Microsoft SqlClient Data Provider for SQL Server
2727

28-
- [6.1.3](https://www.nuget.org/packages/Microsoft.Data.SqlClient/6.1.3)
29-
- [6.0.4](https://www.nuget.org/packages/Microsoft.Data.SqlClient/6.0.4)
30-
- [5.1.8](https://www.nuget.org/packages/Microsoft.Data.SqlClient/5.1.8)
28+
- [7.0.0](https://www.nuget.org/packages/Microsoft.Data.SqlClient/7.0.0)
29+
- [6.1.4](https://www.nuget.org/packages/Microsoft.Data.SqlClient/6.1.4)

0 commit comments

Comments
 (0)