Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit a8fdd4e

Browse files
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/sql-docs-pr into release-remove-sscurrent-tag
2 parents c8019c7 + 8ef3002 commit a8fdd4e

40 files changed

Lines changed: 931 additions & 945 deletions

File tree

docs/connect/ado-net/introduction-microsoft-data-sqlclient-namespace.md

Lines changed: 78 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
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.
44
ms.date: "11/19/2020"
55
ms.assetid: c18b1fb1-2af1-4de7-80a4-95e56fd976cb
66
ms.prod: sql
@@ -19,9 +19,10 @@ ms.reviewer: v-jizho2
1919

2020
Release notes are also available in the GitHub Repository: [2.1 Release Notes](https://github.com/dotnet/SqlClient/tree/master/release-notes/2.1).
2121

22-
### New features
22+
### New features in 2.1
2323

2424
### Cross-Platform support for Always Encrypted
25+
2526
Microsoft.Data.SqlClient v2.1 extends support for Always Encrypted on the following platforms:
2627

2728
| 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
3637
> <sup>2</sup> Always Encrypted with secure enclaves is not supported on .NET Standard 2.0.
3738
3839
### Azure Active Directory Device Code Flow authentication
40+
3941
Microsoft.Data.SqlClient v2.1 provides support for "Device Code Flow" authentication with MSAL.NET.
4042
Reference documentation: [OAuth2.0 Device Authorization Grant flow](/azure/active-directory/develop/v2-oauth2-device-code)
4143

@@ -54,9 +56,11 @@ public class ActiveDirectoryAuthenticationProvider
5456
```
5557

5658
### Azure Active Directory Managed Identity authentication
59+
5760
Microsoft.Data.SqlClient v2.1 introduces support for Azure Active Directory authentication using [managed identities](/azure/active-directory/managed-identities-azure-resources/overview).
5861

5962
The following authentication mode keywords are supported:
63+
6064
- Active Directory Managed Identity
6165
- Active Directory MSI (for cross MS SQL drivers compatibility)
6266

@@ -77,6 +81,7 @@ Connection string examples:
7781
```
7882

7983
### Azure Active Directory Interactive authentication enhancements
84+
8085
Microsoft.Data.SqlClient v2.1 adds the following APIs to customize the "Active Directory Interactive" authentication experience:
8186

8287
```csharp
@@ -97,73 +102,77 @@ public class ActiveDirectoryAuthenticationProvider
97102
```
98103

99104
### `SqlClientAuthenticationProviders` configuration section
105+
100106
Microsoft.Data.SqlClient v2.1 introduces a new configuration section, `SqlClientAuthenticationProviders` (a clone of the existing `SqlAuthenticationProviders`). The existing configuration section, `SqlAuthenticationProviders`, is still supported for backwards compatibility when the appropriate type is defined.
101107

102108
The new section allows application config files to contain both a SqlAuthenticationProviders section for System.Data.SqlClient and a SqlClientAuthenticationProviders section for Microsoft.Data.SqlClient.
103109

104-
105110
### Azure Active Directory authentication using an application client ID
111+
106112
Microsoft.Data.SqlClient v2.1 introduces support for passing a user-defined application client ID to the Microsoft Authentication Library. Application Client ID is used when authenticating with Azure Active Directory.
107113

108114
The following new APIs are introduced:
109115

110116
1. A new constructor has been introduced in ActiveDirectoryAuthenticationProvider:\
111117
_[Applies to all .NET Platforms (.NET Framework, .NET Core, and .NET Standard)]_
112118

113-
```csharp
114-
public ActiveDirectoryAuthenticationProvider(string applicationClientId)
115-
```
119+
```csharp
120+
public ActiveDirectoryAuthenticationProvider(string applicationClientId)
121+
```
116122

117-
Usage:
118-
```csharp
119-
string APP_CLIENT_ID = "<GUID>";
120-
SqlAuthenticationProvider customAuthProvider = new ActiveDirectoryAuthenticationProvider(APP_CLIENT_ID);
121-
SqlAuthenticationProvider.SetProvider(SqlAuthenticationMethod.ActiveDirectoryInteractive, customAuthProvider);
123+
Usage:
122124

123-
using (SqlConnection sqlConnection = new SqlConnection("<connection_string>")
124-
{
125-
sqlConnection.Open();
126-
}
127-
```
125+
```csharp
126+
string APP_CLIENT_ID = "<GUID>";
127+
SqlAuthenticationProvider customAuthProvider = new ActiveDirectoryAuthenticationProvider(APP_CLIENT_ID);
128+
SqlAuthenticationProvider.SetProvider(SqlAuthenticationMethod.ActiveDirectoryInteractive, customAuthProvider);
129+
130+
using (SqlConnection sqlConnection = new SqlConnection("<connection_string>")
131+
{
132+
sqlConnection.Open();
133+
}
134+
```
128135

129136
2. A new configuration property has been introduced under `SqlAuthenticationProviderConfigurationSection` and `SqlClientAuthenticationProviderConfigurationSection`:\
130137
_[Applies to .NET Framework and .NET Core]_
131138

132-
```csharp
133-
internal class SqlAuthenticationProviderConfigurationSection : ConfigurationSection
134-
{
135-
...
136-
[ConfigurationProperty("applicationClientId", IsRequired = false)]
137-
public string ApplicationClientId => this["applicationClientId"] as string;
138-
}
139-
140-
// Inheritance
141-
internal class SqlClientAuthenticationProviderConfigurationSection : SqlAuthenticationProviderConfigurationSection
142-
{ ... }
143-
```
144-
145-
Usage:
146-
```xml
147-
<configuration>
148-
<configSections>
149-
<section name="SqlClientAuthenticationProviders"
150-
type="Microsoft.Data.SqlClient.SqlClientAuthenticationProviderConfigurationSection, Microsoft.Data.SqlClient" />
151-
</configSections>
152-
<SqlClientAuthenticationProviders applicationClientId ="<GUID>" />
153-
</configuration>
154-
155-
<!--or-->
156-
157-
<configuration>
158-
<configSections>
159-
<section name="SqlAuthenticationProviders"
160-
type="Microsoft.Data.SqlClient.SqlAuthenticationProviderConfigurationSection, Microsoft.Data.SqlClient" />
161-
</configSections>
162-
<SqlAuthenticationProviders applicationClientId ="<GUID>" />
163-
</configuration>
164-
```
139+
```csharp
140+
internal class SqlAuthenticationProviderConfigurationSection : ConfigurationSection
141+
{
142+
...
143+
[ConfigurationProperty("applicationClientId", IsRequired = false)]
144+
public string ApplicationClientId => this["applicationClientId"] as string;
145+
}
146+
147+
// Inheritance
148+
internal class SqlClientAuthenticationProviderConfigurationSection : SqlAuthenticationProviderConfigurationSection
149+
{ ... }
150+
```
151+
152+
Usage:
153+
154+
```xml
155+
<configuration>
156+
<configSections>
157+
<section name="SqlClientAuthenticationProviders"
158+
type="Microsoft.Data.SqlClient.SqlClientAuthenticationProviderConfigurationSection, Microsoft.Data.SqlClient" />
159+
</configSections>
160+
<SqlClientAuthenticationProviders applicationClientId ="<GUID>" />
161+
</configuration>
162+
163+
<!--or-->
164+
165+
<configuration>
166+
<configSections>
167+
<section name="SqlAuthenticationProviders"
168+
type="Microsoft.Data.SqlClient.SqlAuthenticationProviderConfigurationSection, Microsoft.Data.SqlClient" />
169+
</configSections>
170+
<SqlAuthenticationProviders applicationClientId ="<GUID>" />
171+
</configuration>
172+
```
165173

166174
### Data Classification v2 support
175+
167176
Microsoft.Data.SqlClient v2.1 introduces support for Data Classification's "Sensitivity Rank" information. The following new APIs are now available:
168177

169178
```csharp
@@ -189,6 +198,7 @@ public enum SensitivityRank
189198
```
190199

191200
### Server Process ID for an active `SqlConnection`
201+
192202
Microsoft.Data.SqlClient v2.1 introduces a new `SqlConnection` property, `ServerProcessId`, on an active connection.
193203

194204
```csharp
@@ -200,6 +210,7 @@ public class SqlConnection
200210
```
201211

202212
### Trace Logging support in Native SNI
213+
203214
Microsoft.Data.SqlClient v2.1 extends the existing `SqlClientEventSource` implementation to enable event tracing in SNI.dll. Events must be captured using a tool like Xperf.
204215

205216
Tracing can be enabled by sending a command to `SqlClientEventSource` as illustrated below:
@@ -215,42 +226,39 @@ EventSource.SendCommand(eventSource, (EventCommand)16384, null);
215226
EventSource.SendCommand(eventSource, (EventCommand)(8192 | 16384), null);
216227
```
217228

218-
219229
### "Command Timeout" connection string property
230+
220231
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.
221232

222233
Connection string examples:
223234

224235
`"Server={serverURL}; Initial Catalog={db}; Integrated Security=true; Command Timeout=60"`
225236

226237
### Removal of symbols from Native SNI
238+
227239
With Microsoft.Data.SqlClient v2.1, we've removed the symbols introduced in [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.
228240
229241
### Source-Linking of Microsoft.Data.SqlClient symbols
230-
Starting with Microsoft.Data.SqlClient v2.1, Microsoft.Data.SqlClient symbols are source-linked and published to the Microsoft Symbols Server for an enhanced debugging experience without the need to download source code.
231242

243+
Starting with Microsoft.Data.SqlClient v2.1, Microsoft.Data.SqlClient symbols are source-linked and published to the Microsoft Symbols Server for an enhanced debugging experience without the need to download source code.
232244

233245
## Release notes for Microsoft.Data.SqlClient 2.0
234246

235247
Release notes are also available in the GitHub Repository: [2.0 Release Notes](https://github.com/dotnet/SqlClient/tree/master/release-notes/2.0).
236248
237-
### Breaking changes
249+
### Breaking changes in 2.0
238250

239251
- The access modifier for the enclave provider interface `SqlColumnEncryptionEnclaveProvider` has been changed from `public` to `internal`.
240-
241252
- Constants in the `SqlClientMetaDataCollectionNames` class have been updated to reflect changes in SQL Server.
242-
243253
- The driver will now perform Server Certificate validation when the target SQL Server enforces TLS encryption, which is the default for Azure connections.
244-
245254
- `SqlDataReader.GetSchemaTable()` now returns an empty `DataTable` instead `null`.
246-
247255
- The driver now performs decimal scale rounding to match SQL Server behavior. For backwards compatibility, the previous behavior of truncation can be enabled using an AppContext switch.
248-
249-
- For .NET Framework applications consuming **Microsoft.Data.SqlClient**, the SNI.dll files previously downloaded to the `bin\x64` and `bin\x86` folders are now named `Microsoft.Data.SqlClient.SNI.x64.dll` and` Microsoft.Data.SqlClient.SNI.x86.dll` and will be downloaded to the `bin` directory.
250-
256+
- For .NET Framework applications consuming **Microsoft.Data.SqlClient**, the SNI.dll files previously downloaded to the `bin\x64` and `bin\x86` folders are now named `Microsoft.Data.SqlClient.SNI.x64.dll` and `Microsoft.Data.SqlClient.SNI.x86.dll` and will be downloaded to the `bin` directory.
251257
- New connection string property synonyms will replace old properties when fetching connection string from `SqlConnectionStringBuilder` for consistency. [Read More](#new-connection-string-property-synonyms)
252258

253-
### New features
259+
### New features in 2.0
260+
261+
The following new features have been introduced in Microsoft.Data.SqlClient 2.0.
254262

255263
#### DNS failure resiliency
256264

@@ -260,7 +268,7 @@ The driver will now cache IP addresses from every successful connection to a SQL
260268

261269
This release introduces support for capturing event trace logs for debugging applications. To capture these events, client applications must listen for events from SqlClient's EventSource implementation:
262270

263-
```
271+
```csharp
264272
Microsoft.Data.SqlClient.EventSource
265273
```
266274

@@ -321,7 +329,7 @@ A username can be specified in the connection string when using Azure Active Dir
321329

322330
Set a username using the **User ID** or **UID** connection string property:
323331

324-
```
332+
```csharp
325333
"Server=<server name>; Database=<db name>; Authentication=Active Directory Interactive; User Id=<username>;"
326334
```
327335

@@ -337,14 +345,14 @@ Microsoft.Data.SqlClient (.NET Core and .NET Standard) on Windows is now depende
337345

338346
Release notes are also available in the GitHub Repository: [1.1 Release Notes](https://github.com/dotnet/SqlClient/tree/master/release-notes/1.1).
339347

340-
### New features
348+
### New features in 1.1
341349

342350
#### Always Encrypted with secure enclaves
343351

344352
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:
345353

346-
```
347-
Attestation Protocol=HGS;Enclave Attestation Url=<attestation_url_for_HGS>
354+
```csharp
355+
"Attestation Protocol=HGS;Enclave Attestation Url=<attestation_url_for_HGS>"
348356
```
349357

350358
For more information, see:
@@ -354,10 +362,10 @@ For more information, see:
354362

355363
## Release notes for Microsoft.Data.SqlClient 1.0
356364

357-
The initial release for the Microsoft.Data.SqlClient namespace offers additional functionality over the existing System.Data.SqlClient namespace.
365+
The initial release for the Microsoft.Data.SqlClient namespace offers more functionality over the existing System.Data.SqlClient namespace.
358366
Release notes are also available on the GitHub Repository: [1.0 Release Notes](https://github.com/dotnet/SqlClient/tree/master/release-notes/1.0).
359367

360-
### New features
368+
### New features in 1.0
361369

362370
#### New features over .NET Framework 4.7.2 System.Data.SqlClient
363371

@@ -417,7 +425,7 @@ namespace Microsoft.Data.SqlClient.DataClassification
417425

418426
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's new in SQL Server 2019](../../sql-server/what-s-new-in-sql-server-ver15.md).
419427

420-
### Always encrypted with enclaves
428+
### Always encrypted with secure enclaves
421429

422430
In general, existing documentation that uses System.Data.SqlClient on .NET Framework **and built-in column master key store providers** should now work with .NET Core, too.
423431

@@ -431,4 +439,4 @@ Different authentication modes can be specified by using the _Authentication_ co
431439

432440
> [!NOTE]
433441
> Custom key store providers, like the Azure Key Vault provider, will need to be updated to support Microsoft.Data.SqlClient. Similarly, enclave providers will also need to be updated to support Microsoft.Data.SqlClient.
434-
> Always Encrypted is only supported against .NET Framework and .NET Core targets. It is not supported against .NET Standard since .NET Standard is missing certain encryption dependencies.
442+
> Always Encrypted is only supported against .NET Framework and .NET Core targets. It is not supported against .NET Standard since .NET Standard is missing certain encryption dependencies.

docs/connect/ado-net/overview-sqlclient-driver.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: "Overview of the SqlClient driver | Microsoft Docs"
3-
description: "An overview of the Microsoft SqlClient Data Provider for SQL Server."
2+
title: Overview of the SqlClient driver
3+
description: Find an overview of the Microsoft SqlClient Data Provider for SQL Server and its role as an ADO.NET provider for .NET applications.
44
ms.custom: ""
5-
ms.date: "06/15/2019"
5+
ms.date: 06/15/2019
66
ms.prod: sql
77
ms.prod_service: connectivity
88
ms.technology: connectivity
@@ -16,13 +16,13 @@ ms.reviewer: v-kaywon
1616

1717
[!INCLUDE[Driver_ADONET_Download](../../includes/driver_adonet_download.md)]
1818

19-
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.
2020

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.
2222

2323
## In this section
2424

25-
|Topic|Description|
25+
|Article|Description|
2626
|-----------|-----------------|
2727
|[Introduction to Microsoft.Data.SqlClient namespace](introduction-microsoft-data-sqlclient-namespace.md)|Introduction page for the Microsoft.Data.SqlClient namespace.|
2828
|[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
3333
|[Finding additional SqlClient driver information](find-additional-sqlclient-driver-information.md)|Page that contains useful information about the driver.|
3434

3535
## Next steps
36-
[SqlClient driver GitHub Repository](https://github.com/dotnet/SqlClient)
37-
[.NET API browser](/dotnet/api/)
36+
37+
- [SqlClient driver GitHub Repository](//github.com/dotnet/SqlClient)
38+
- [.NET API browser](/dotnet/api/)

0 commit comments

Comments
 (0)