|
| 1 | +# Release Notes |
| 2 | + |
| 3 | +## Microsoft.Data.SqlClient 2.1.0-preview1.20235.1 released 21 August 2020 |
| 4 | + |
| 5 | +This update brings the below changes over the previous release: |
| 6 | + |
| 7 | +### Added |
| 8 | +- Added support for Always Encrypted with secure enclaves on Unix for .NET Core 2.1+ and on all supported platforms for .NET Standard 2.1+ [#676](https://github.com/dotnet/SqlClient/pull/676) [[Read more](#Cross-Platform-support-for-Always-Encrypted-and-Secure-Enclaves)] |
| 9 | +- Added support for Azure Active Directory Device Code Flow authentication [#597](https://github.com/dotnet/SqlClient/pull/597) [[Read more](#Azure-Active-Directory-Device-Code-Flow-authentication)] |
| 10 | +- Added new APIs to enable customizations for "Active Directory Interactive" authentication experience [#597](https://github.com/dotnet/SqlClient/pull/597) [Read more](#Azure-Active-Directory-Interactive-authentication-enhancements) |
| 11 | +- Added Sensitivity Rank support in Sensitivity Classification information [#626](https://github.com/dotnet/SqlClient/pull/626) [[Read more](#Data-Classification-v2-support)] |
| 12 | +- Added support to obtain `ServerProcessId()` (SPID) information on an active `SqlConnection` instance [#660](https://github.com/dotnet/SqlClient/pull/660) [[Read more](#Server-Process-Id-for-active-SqlConnection)] |
| 13 | +- Added support for a new Configuration Section, `SqlClientAuthenticationProviders` (duplicate of existing `SqlAuthenticationProviders`), to allow co-existence of configurations for both drivers, "System.Data.SqlClient" and "Microsoft.Data.SqlClient" [#702](https://github.com/dotnet/SqlClient/pull/702) [[Read more](#SqlClientAuthenticationProviders-configuration-section)] |
| 14 | +- Added TraceLogging in Native SNI to extend `SqlClientEventSource` support [#650](https://github.com/dotnet/SqlClient/pull/650) [[Read more](#Trace-Logging-support-in-Native-SNI)] |
| 15 | +- Updated Microsoft.Data.SqlClient.SNI (.NET Framework dependency) and Microsoft.Data.SqlClient.SNI.runtime (.NET Core/Standard dependency) version to v2.1.0 with trace logging implementation [#705](https://github.com/dotnet/SqlClient/pull/705) |
| 16 | + |
| 17 | +### Fixed |
| 18 | +- Fixed Enclave session cache issue with Azure Database [#686](https://github.com/dotnet/SqlClient/pull/686) |
| 19 | +- Fixed pooled connection re-use on access token expiry issue when using Active Directory authentication modes [#635](https://github.com/dotnet/SqlClient/pull/635) |
| 20 | +- Fixed transient fault handling for Pooled connections [#637](https://github.com/dotnet/SqlClient/pull/637) |
| 21 | +- Fixed SPN generation issue when no port is provided [#629](https://github.com/dotnet/SqlClient/pull/629) |
| 22 | +- Fixed missing null checks for `SqlErrors` in `SqlException` for .NET Framework implementation [#698](https://github.com/dotnet/SqlClient/pull/698) |
| 23 | + |
| 24 | +### Changes |
| 25 | +- Performance improvements by fixing unnecessary allocations with EventSource implementation [#684](https://github.com/dotnet/SqlClient/pull/684) |
| 26 | +- Reverted changes to return empty DataTable from GetSchemaTable to return null as before. [#696](https://github.com/dotnet/SqlClient/pull/696) |
| 27 | +- Removed multiple `CacheConnectionStringProperties` calls when setting `ConnectionString` properties [#683](https://github.com/dotnet/SqlClient/pull/683) |
| 28 | +- Code Improvements by only checking inexact match when no exact match is found for an embedded resource [#668](https://github.com/dotnet/SqlClient/pull/668) |
| 29 | +- Changed `_SqlMetaData` to lazy initialize hidden column map [#521](https://github.com/dotnet/SqlClient/pull/521) |
| 30 | +- Renamed internal string resource file and helpers for .NET Core implementation [#671](https://github.com/dotnet/SqlClient/pull/671) |
| 31 | +- Performance improvements by reworking `ExecuteReaderAsync` to minimize allocations [#528](https://github.com/dotnet/SqlClient/pull/528) |
| 32 | +- Performance improvements by moving `DataReader` caches to internal connection [#499](https://github.com/dotnet/SqlClient/pull/499) |
| 33 | +- Moved common files to shared folder between .NET Framework and .NET Core implementation [#618](https://github.com/dotnet/SqlClient/pull/618) [#625](https://github.com/dotnet/SqlClient/pull/625) |
| 34 | + |
| 35 | +## New features over Stable release v2.0 |
| 36 | + |
| 37 | +### Cross-Platform support for Always Encrypted and Secure Enclaves |
| 38 | +Microsoft.Data.SqlClient v2.1 extends support for Always Encrypted (including with secure enclaves) on the following platforms: |
| 39 | + |
| 40 | +| Target Framework | Platform | New Feature support | |
| 41 | +|------------------|----------|----| |
| 42 | +| .NET Framework v4.6+ | Windows | *No changes* | |
| 43 | +| .NET Core 2.1+ | All Operating Systems | **Yes, Support on Linux/MacOS** | |
| 44 | +| .NET Standard 2.1+ | All Operating Systems | **Yes, Support on All Operating Systems** | |
| 45 | + |
| 46 | +### Azure Active Directory Device Code Flow authentication |
| 47 | +Microsoft.Data.SqlClient v2.1 provides support for "Device Code Flow" authentication with MSAL.NET. |
| 48 | +Reference documentation: [OAuth2.0 Device Authorization Grant flow](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-device-code) |
| 49 | + |
| 50 | +Connection string example: |
| 51 | + |
| 52 | +`Server=<server>.database.windows.net; Authentication=Active Directory Device Code Flow; Database=Northwind;` |
| 53 | + |
| 54 | +The following API enables customization of the Device Code Flow callback mechanism: |
| 55 | + |
| 56 | +```csharp |
| 57 | +public class ActiveDirectoryAuthenticationProvider |
| 58 | +{ |
| 59 | + // For .NET Framework, .NET Core and .NET Standard targeted applications |
| 60 | + public void SetDeviceCodeFlowCallback(Func<DeviceCodeResult, Task> deviceCodeFlowCallbackMethod) |
| 61 | +} |
| 62 | +``` |
| 63 | + |
| 64 | +### Azure Active Directory Interactive authentication enhancements |
| 65 | +Microsoft.Data.SqlClient v2.1 provides the following new APIs to enable customizations for the "Active Directory Interactive" authentication experience: |
| 66 | + |
| 67 | +```csharp |
| 68 | +public class ActiveDirectoryAuthenticationProvider |
| 69 | +{ |
| 70 | + // For .NET Framework targeted applications only |
| 71 | + public void SetIWin32WindowFunc(Func<IWin32Window> iWin32WindowFunc); |
| 72 | + |
| 73 | + // For .NET Standard targeted applications only |
| 74 | + public void SetParentActivityOrWindowFunc(Func<object> parentActivityOrWindowFunc); |
| 75 | + |
| 76 | + // For .NET Framework, .NET Core and .NET Standard targeted applications |
| 77 | + public void SetCustomWebUi(ICustomWebUi customWebUi); |
| 78 | +} |
| 79 | +``` |
| 80 | + |
| 81 | +### Data Classification v2 support |
| 82 | +Microsoft.Data.SqlClient v2.1 introduces support for Data Classification's "Sensitivity Rank" information. The following new APIs are now available: |
| 83 | + |
| 84 | +```csharp |
| 85 | +public class SensitivityClassification |
| 86 | +{ |
| 87 | + public SensitivityRank SensitivityRank; |
| 88 | +} |
| 89 | + |
| 90 | +public class SensitivityProperty |
| 91 | +{ |
| 92 | + public SensitivityRank SensitivityRank; |
| 93 | +} |
| 94 | + |
| 95 | +public enum SensitivityRank |
| 96 | +{ |
| 97 | + NOT_DEFINED = -1, |
| 98 | + NONE = 0, |
| 99 | + LOW = 10, |
| 100 | + MEDIUM = 20, |
| 101 | + HIGH = 30, |
| 102 | + CRITICAL = 40 |
| 103 | +} |
| 104 | +``` |
| 105 | + |
| 106 | +### Server Process Id for an active SqlConnection |
| 107 | +Microsoft.Data.SqlClient v2.1 introduces a new `SqlConnection` property, `ServerProcessId`, on an active connection. |
| 108 | + |
| 109 | +```csharp |
| 110 | +public class SqlConnection |
| 111 | +{ |
| 112 | + // Returns the server process Id (SPID) of the active connection. |
| 113 | + public int ServerProcessId; |
| 114 | +} |
| 115 | +``` |
| 116 | + |
| 117 | +### Trace Logging support in Native SNI |
| 118 | +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. |
| 119 | + |
| 120 | +Tracing can be enabled by sending a command to `SqlClientEventSource` as illustrated below: |
| 121 | + |
| 122 | +```csharp |
| 123 | +// Enables trace events: |
| 124 | +EventSource.SendCommand(eventSource, (EventCommand)8192, null); |
| 125 | + |
| 126 | +// Enables flow events: |
| 127 | +EventSource.SendCommand(eventSource, (EventCommand)16384, null); |
| 128 | + |
| 129 | +// Enables both trace and flow events: |
| 130 | +EventSource.SendCommand(eventSource, (EventCommand)(8192 | 16384), null); |
| 131 | +``` |
| 132 | + |
| 133 | +### SqlClientAuthenticationProviders configuration section |
| 134 | +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. |
| 135 | + |
| 136 | +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. |
| 137 | + |
| 138 | + |
| 139 | +## Target Platform Support |
| 140 | + |
| 141 | +- .NET Framework 4.6+ (Windows x86, Windows x64) |
| 142 | +- .NET Core 2.1+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) |
| 143 | +- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) |
| 144 | + |
| 145 | +### Dependencies |
| 146 | + |
| 147 | +#### .NET Framework |
| 148 | + |
| 149 | +- Microsoft.Data.SqlClient.SNI 2.1.0 |
| 150 | +- Microsoft.Identity.Client 4.14.0 |
| 151 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 5.6.0 |
| 152 | +- Microsoft.IdentityModel.JsonWebTokens 5.6.0 |
| 153 | + |
| 154 | +#### .NET Core 2.1 |
| 155 | + |
| 156 | +- Microsoft.Data.SqlClient.SNI.runtime 2.1.0 |
| 157 | +- Microsoft.Win32.Registry 4.7.0 |
| 158 | +- System.Security.Principal.Windows 4.7.0 |
| 159 | +- System.Text.Encoding.CodePages 4.7.0 |
| 160 | +- System.Diagnostics.DiagnosticSource 4.7.0 |
| 161 | +- System.Configuration.ConfigurationManager 4.7.0 |
| 162 | +- System.Runtime.Caching 4.7.0 |
| 163 | +- Microsoft.Identity.Client 4.14.0 |
| 164 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 5.6.0 |
| 165 | +- Microsoft.IdentityModel.JsonWebTokens 5.6.0 |
| 166 | + |
| 167 | +#### .NET Core 3.1 |
| 168 | + |
| 169 | +- Microsoft.Data.SqlClient.SNI.runtime 2.1.0 |
| 170 | +- Microsoft.Win32.Registry 4.7.0 |
| 171 | +- System.Security.Principal.Windows 4.7.0 |
| 172 | +- System.Text.Encoding.CodePages 4.7.0 |
| 173 | +- System.Diagnostics.DiagnosticSource 4.7.0 |
| 174 | +- System.Configuration.ConfigurationManager 4.7.0 |
| 175 | +- System.Runtime.Caching 4.7.0 |
| 176 | +- Microsoft.Identity.Client 4.14.0 |
| 177 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 5.6.0 |
| 178 | +- Microsoft.IdentityModel.JsonWebTokens 5.6.0 |
| 179 | + |
| 180 | +#### .NET Standard 2.0 |
| 181 | + |
| 182 | +- Microsoft.Data.SqlClient.SNI.runtime 2.1.0 |
| 183 | +- Microsoft.Win32.Registry 4.7.0 |
| 184 | +- System.Buffers 4.5.1 |
| 185 | +- System.Memory 4.5.4 |
| 186 | +- System.Security.Principal.Windows 4.7.0 |
| 187 | +- System.Text.Encoding.CodePages 4.7.0 |
| 188 | +- Microsoft.Identity.Client 4.14.0 |
| 189 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 5.6.0 |
| 190 | +- Microsoft.IdentityModel.JsonWebTokens 5.6.0 |
| 191 | + |
| 192 | +#### .NET Standard 2.1 |
| 193 | + |
| 194 | +- Microsoft.Data.SqlClient.SNI.runtime 2.1.0 |
| 195 | +- Microsoft.Win32.Registry 4.7.0 |
| 196 | +- System.Buffers 4.5.1 |
| 197 | +- System.Memory 4.5.4 |
| 198 | +- System.Security.Principal.Windows 4.7.0 |
| 199 | +- System.Text.Encoding.CodePages 4.7.0 |
| 200 | +- Microsoft.Identity.Client 4.14.0 |
| 201 | +- Microsoft.IdentityModel.Protocols.OpenIdConnect 5.6.0 |
| 202 | +- Microsoft.IdentityModel.JsonWebTokens 5.6.0 |
0 commit comments