You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To prevent a login attempt from waiting indefinitely, you can set the AppContext switch **Switch.Microsoft.Data.SqlClient.UseOneSecFloorInTimeoutCalculationDuringLogin** to `true` at application startup:
Copy file name to clipboardExpand all lines: docs/connect/ado-net/introduction-microsoft-data-sqlclient-namespace.md
+57-1Lines changed: 57 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Introduction to Microsoft.Data.SqlClient namespace
3
3
description: Learn about the Microsoft.Data.SqlClient namespace and how it's the preferred way to connect to SQL for .NET applications.
4
4
author: David-Engel
5
5
ms.author: v-davidengel
6
-
ms.date: 04/19/2023
6
+
ms.date: 02/28/2024
7
7
ms.service: sql
8
8
ms.subservice: connectivity
9
9
ms.topic: conceptual
@@ -20,6 +20,62 @@ There are a few differences in less-used APIs compared to System.Data.SqlClient
20
20
21
21
The Microsoft.Data.SqlClient API details can be found in the [.NET API Browser](/dotnet/api/microsoft.data.sqlclient).
22
22
23
+
## Release notes for Microsoft.Data.SqlClient 5.2
24
+
25
+
### New features in 5.2
26
+
27
+
- Added support of `SqlDiagnosticListener` on **.NET Standard**. [#1931](https://github.com/dotnet/SqlClient/pull/1931)
28
+
- Added new property `RowsCopied64` to `SqlBulkCopy`. [#2004](https://github.com/dotnet/SqlClient/pull/2004)[Read more](#added-new-property-rowscopied64-to-sqlbulkcopy)
29
+
- Added a new `AccessTokenCallBack` API to `SqlConnection`. [#1260](https://github.com/dotnet/SqlClient/pull/1260)
30
+
- Added support for the `SuperSocketNetLib` registry option for Encrypt on .NET on Windows. [#2047](https://github.com/dotnet/SqlClient/pull/2047)
31
+
- Added `SqlBatch` support on .NET 6+ [#1825](https://github.com/dotnet/SqlClient/pull/1825), [#2223](https://github.com/dotnet/SqlClient/pull/2223)
32
+
- Added Workload Identity authentication support [#2159](https://github.com/dotnet/SqlClient/pull/2159), [#2264](https://github.com/dotnet/SqlClient/pull/2264)
33
+
- Added Localization support on .NET [#2210](https://github.com/dotnet/SqlClient/pull/2110)
34
+
- Added support for Georgian collation [#2194](https://github.com/dotnet/SqlClient/pull/2194)
35
+
- Added support for Big Endian systems [#2170](https://github.com/dotnet/SqlClient/pull/2170)
36
+
- Added .NET 8 support [#2230](https://github.com/dotnet/SqlClient/pull/2230)
37
+
- Added explicit version for major .NET version dependencies on System.Runtime.Caching 8.0.0, System.Configuration.ConfigurationManager 8.0.0, and System.Diagnostics.DiagnosticSource 8.0.0 [#2303](https://github.com/dotnet/SqlClient/pull/2303)
38
+
- Added the ability to generate debugging symbols in a separate package file [#2137](https://github.com/dotnet/SqlClient/pull/2137)
39
+
40
+
### Added new property `RowsCopied64` to SqlBulkCopy
41
+
42
+
SqlBulkCopy has a new property `RowsCopied64` which supports `long` value types.
43
+
44
+
**Note that the existing `SqlBulkCopy.RowsCopied` behavior is unchanged. When the value exceeds `int.MaxValue`, `RowsCopied` can return a negative number.**
45
+
46
+
Example usage:
47
+
48
+
```C#
49
+
using (SqlConnectionsrcConn=newSqlConnection(srcConstr))
50
+
using (SqlCommandsrcCmd=newSqlCommand("select top 5 * from employees", srcConn))
51
+
{
52
+
srcConn.Open();
53
+
using (DbDataReaderreader=srcCmd.ExecuteReader())
54
+
{
55
+
using (SqlBulkCopybulkcopy=newSqlBulkCopy(dstConn))
- .NET Framework 4.6.2+ (Windows x86, Windows x64)
74
+
- .NET 6.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS)
75
+
- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS)
76
+
77
+
Full release notes, including dependencies, are available in the GitHub Repository: [5.2 Release Notes](https://github.com/dotnet/SqlClient/tree/main/release-notes/5.2).
78
+
23
79
### Breaking changes in 5.1
24
80
25
81
- Dropped support for .NET Core 3.1. [#1704](https://github.com/dotnet/SqlClient/pull/1704)[#1823](https://github.com/dotnet/SqlClient/pull/1823)
Copy file name to clipboardExpand all lines: docs/connect/ado-net/sql/azure-active-directory-authentication.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Describes how to use supported Microsoft Entra authentication modes
4
4
author: David-Engel
5
5
ms.author: v-davidengel
6
6
ms.reviewer: v-davidengel
7
-
ms.date: 01/30/2024
7
+
ms.date: 02/28/2024
8
8
ms.service: sql
9
9
ms.subservice: connectivity
10
10
ms.topic: conceptual
@@ -51,6 +51,7 @@ When the application is connecting to Azure SQL data sources by using Microsoft
51
51
| Active Directory Device Code Flow | Authenticate with a Microsoft Entra identity by using Device Code Flow mode | 2.1.0+ |
52
52
| Active Directory Managed Identity, <br>Active Directory MSI | Authenticate using a Microsoft Entra system-assigned or user-assigned managed identity | 2.1.0+ |
53
53
| Active Directory Default | Authenticate with a Microsoft Entra identity by using password-less and non-interactive mechanisms including managed identities, Visual Studio Code, Visual Studio, Azure CLI, etc. | 3.0.0+ |
54
+
| Active Directory Workload Identity| Authenticate with a Microsoft Entra identity by using a federated User Assigned Managed Identity to connect to SQL Database from Azure client environments that have enabled support for Workload Identity. | 5.2.0+ |
54
55
55
56
<sup>1</sup> Before **Microsoft.Data.SqlClient** 2.0.0, `Active Directory Integrated`, and `Active Directory Interactive` authentication modes are supported only on .NET Framework.
56
57
@@ -271,6 +272,22 @@ using (SqlConnection conn = new SqlConnection(ConnectionString)) {
271
272
}
272
273
```
273
274
275
+
## Using workload identity authentication
276
+
277
+
Available starting in version 5.2, like with managed identities, [workload identity](/azure/aks/workload-identity-overview) authentication mode uses the value of the User Id parameter in the connection string for its Client Id if specified. But unlike managed identity, WorkloadIdentityCredentialOptions defaults its value from environment variables: AZURE_TENANT_ID, AZURE_CLIENT_ID, and AZURE_FEDERATED_TOKEN_FILE. However, only the Client Id may be overridden by the connection string.
278
+
279
+
The following example demonstrates `Active Directory Workload Identity` authentication with a user-assigned managed identity with **Microsoft.Data.SqlClient v5.2 onwards**.
280
+
281
+
```cs
282
+
// Use your own values for Server, Database, and User Id.
283
+
// With Microsoft.Data.SqlClient v5.2+
284
+
stringConnectionString=@"Server=demo.database.windows.net; Authentication=Active Directory Workload Identity; Encrypt=True; User Id=ClientIdOfManagedIdentity; Database=testdb";
285
+
286
+
using (SqlConnectionconn=newSqlConnection(ConnectionString)) {
287
+
conn.Open();
288
+
}
289
+
```
290
+
274
291
## Customizing Microsoft Entra authentication
275
292
276
293
Besides using the Microsoft Entra authentication built into the driver, **Microsoft.Data.SqlClient** 2.1.0 and later provide applications the option to customize Microsoft Entra authentication. The customization is based on the `ActiveDirectoryAuthenticationProvider` class, which is derived from the [`SqlAuthenticationProvider`](/dotnet/api/system.data.sqlclient.sqlauthenticationprovider) abstract class.
Copy file name to clipboardExpand all lines: docs/connect/ado-net/sqlclient-driver-support-lifecycle.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: SqlClient driver support lifecycle
3
3
description: Product support lifecycle information for the Microsoft.Data.SqlClient .NET library.
4
4
author: David-Engel
5
5
ms.author: v-davidengel
6
-
ms.date: 10/31/2023
6
+
ms.date: 02/28/2024
7
7
ms.service: sql
8
8
ms.subservice: connectivity
9
9
ms.topic: conceptual
@@ -27,6 +27,7 @@ New stable (GA) releases are published every six months on a regular cadence beg
27
27
28
28
| Version | Official Release Date | Latest Patch Version | Patch Release Date | Support Level | End of Support |
29
29
|--|--|--|--|--|--|
30
+
| 5.2 | February 28, 2024 | - | - | Current | - |
30
31
| 5.1 | January 19, 2023 | 5.1.5 | January 29, 2024 | LTS | January 20, 2026 |
31
32
| 4.0 | November 18, 2021 | 4.0.5 | January 9, 2024 | LTS | November 19, 2024 |
32
33
| 3.1 | March 30, 2022 | 3.1.5 | January 9, 2024 | LTS | March 30, 2025 |
@@ -72,6 +73,7 @@ Current releases are supported for three months after a subsequent Current or LT
72
73
73
74
|Database version →<br />↓ Driver Version|Azure SQL Database|Azure Synapse Analytics|Azure SQL Managed Instance|SQL Server 2022|SQL Server 2019|SQL Server 2017|SQL Server 2016|SQL Server 2014|SQL Server 2012|
0 commit comments