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
Copy file name to clipboardExpand all lines: docs/connect/ado-net/introduction-microsoft-data-sqlclient-namespace.md
+78-70Lines changed: 78 additions & 70 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: "Introduction to Microsoft.Data.SqlClient namespace"
3
-
description: "Learn about the Microsoft.Data.SqlClient namespace and how it's the preferred way to connect to SQL for .NET applications."
2
+
title: Introduction to Microsoft.Data.SqlClient namespace
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
ms.date: "11/19/2020"
5
5
ms.assetid: c18b1fb1-2af1-4de7-80a4-95e56fd976cb
6
6
ms.prod: sql
@@ -19,9 +19,10 @@ ms.reviewer: v-jizho2
19
19
20
20
Release notes are also available in the GitHub Repository: [2.1 Release Notes](https://github.com/dotnet/SqlClient/tree/master/release-notes/2.1).
21
21
22
-
### New features
22
+
### New features in 2.1
23
23
24
24
### Cross-Platform support for Always Encrypted
25
+
25
26
Microsoft.Data.SqlClient v2.1 extends support for Always Encrypted on the following platforms:
26
27
27
28
| Support Always Encrypted | Support Always Encrypted with Secure Enclave | Target Framework | Microsoft.Data.SqlClient Version | Operating System |
@@ -36,6 +37,7 @@ Microsoft.Data.SqlClient v2.1 extends support for Always Encrypted on the follow
36
37
> <sup>2</sup> Always Encrypted with secure enclaves is not supported on .NET Standard 2.0.
37
38
38
39
### Azure Active Directory Device Code Flow authentication
40
+
39
41
Microsoft.Data.SqlClient v2.1 provides support for "Device Code Flow" authentication with MSAL.NET.
40
42
Reference documentation: [OAuth2.0 Device Authorization Grant flow](/azure/active-directory/develop/v2-oauth2-device-code)
41
43
@@ -54,9 +56,11 @@ public class ActiveDirectoryAuthenticationProvider
54
56
```
55
57
56
58
### Azure Active Directory Managed Identity authentication
59
+
57
60
Microsoft.Data.SqlClient v2.1 introduces support for Azure Active Directory authentication using [managedidentities](/azure/active-directory/managed-identities-azure-resources/overview).
58
61
59
62
The following authentication mode keywords are supported:
63
+
60
64
- Active Directory ManagedIdentity
61
65
- Active DirectoryMSI (forcrossMSSQLdriverscompatibility)
62
66
@@ -77,6 +81,7 @@ Connection string examples:
77
81
```
78
82
79
83
### Azure Active Directory Interactive authentication enhancements
84
+
80
85
Microsoft.Data.SqlClient v2.1 adds the following APIs to customize the "Active Directory Interactive" authentication experience:
81
86
82
87
```csharp
@@ -97,73 +102,77 @@ public class ActiveDirectoryAuthenticationProvider
using (SqlConnectionsqlConnection=newSqlConnection("<connection_string>")
131
+
{
132
+
sqlConnection.Open();
133
+
}
134
+
```
128
135
129
136
2. Anewconfigurationpropertyhasbeenintroducedunder `SqlAuthenticationProviderConfigurationSection` and `SqlClientAuthenticationProviderConfigurationSection`:\
Microsoft.Data.SqlClient v2.1 introduces the "Command Timeout" connection string property to override the default of 30 seconds. The timeout for individual commands can be overridden using the `CommandTimeout` property on the SqlCommand.
WithMicrosoft.Data.SqlClientv2.1, we'veremovedthesymbolsintroducedin [v2.0.0](https://www.nuget.org/packages/Microsoft.Data.SqlClient.SNI/2.0.0) from [Microsoft.Data.SqlClient.SNI.runtime](https://www.nuget.org/packages/Microsoft.Data.SqlClient.SNI.runtime) NuGet starting with [v2.1.1](https://www.nuget.org/packages/Microsoft.Data.SqlClient.SNI.runtime/2.1.1). The public symbols are now published to Microsoft Symbols Server for tools like BinSkim that require access to public symbols.
228
240
229
241
### Source-Linking of Microsoft.Data.SqlClient symbols
- For .NETFrameworkapplicationsconsuming **Microsoft.Data.SqlClient**, theSNI.dllfilespreviouslydownloadedtothe `bin\x64` and `bin\x86` foldersarenownamed `Microsoft.Data.SqlClient.SNI.x64.dll` and` Microsoft.Data.SqlClient.SNI.x86.dll` andwillbedownloadedtothe `bin` directory.
250
-
256
+
- For .NETFrameworkapplicationsconsuming **Microsoft.Data.SqlClient**, theSNI.dllfilespreviouslydownloadedtothe `bin\x64` and `bin\x86` foldersarenownamed `Microsoft.Data.SqlClient.SNI.x64.dll` and `Microsoft.Data.SqlClient.SNI.x86.dll` andwillbedownloadedtothe `bin` directory.
@@ -321,7 +329,7 @@ A username can be specified in the connection string when using Azure Active Dir
321
329
322
330
Set a username using the **User ID** or **UID** connection string property:
323
331
324
-
```
332
+
```csharp
325
333
"Server=<server name>; Database=<db name>; Authentication=Active Directory Interactive; User Id=<username>;"
326
334
```
327
335
@@ -337,14 +345,14 @@ Microsoft.Data.SqlClient (.NET Core and .NET Standard) on Windows is now depende
337
345
338
346
Release notes are also available in the GitHub Repository: [1.1 Release Notes](https://github.com/dotnet/SqlClient/tree/master/release-notes/1.1).
339
347
340
-
### New features
348
+
### New features in 1.1
341
349
342
350
#### Always Encrypted with secure enclaves
343
351
344
352
Always Encrypted is available starting in Microsoft SQL Server 2016. Secure enclaves are available starting in Microsoft SQL Server 2019. To use the enclave feature, connection strings should include the required attestation protocol and attestation URL. For example:
UTF-8 support doesn't require any application code changes. These SqlClient changes optimize client-server communication when the server supports UTF-8 and the underlying column collation is UTF-8. See the UTF-8 section under [What'snewinSQLServer 2019](../../sql-server/what-s-new-in-sql-server-ver15.md).
The Microsoft SqlClient Data Provider for SQL Server is a .NET Framework and .NET Core data provider used for connecting to a database, executing commands, and retrieving results.
19
+
The Microsoft SqlClient Data Provider for SQL Server is a .NET Framework and .NET Core data provider. It's used for connecting to a database, executing commands, and retrieving results.
20
20
21
-
The articles in this section provide a general overview of the SqlClient driver.
21
+
The articles in this section provide a general overview of the SqlClient driver.
22
22
23
23
## In this section
24
24
25
-
|Topic|Description|
25
+
|Article|Description|
26
26
|-----------|-----------------|
27
27
|[Introduction to Microsoft.Data.SqlClient namespace](introduction-microsoft-data-sqlclient-namespace.md)|Introduction page for the Microsoft.Data.SqlClient namespace.|
28
28
|[Download Microsoft SqlClient Data Provider for SQL Server](download-microsoft-sqlclient-data-provider.md)|Download page for ADO.NET and Microsoft SqlClient Data Provider for SQL Server.|
@@ -33,5 +33,6 @@ ms.reviewer: v-kaywon
33
33
|[Finding additional SqlClient driver information](find-additional-sqlclient-driver-information.md)|Page that contains useful information about the driver.|
0 commit comments