
committed by
GitHub

No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 370 additions and 9 deletions
-
67CHANGELOG.md
-
284release-notes/5.2/5.2.0.md
-
18release-notes/5.2/5.2.md
-
6release-notes/5.2/README.md
-
4release-notes/README.md
@ -1,7 +1,277 @@ |
|||
| Release Date | Version | Notes | |
|||
| :-- | :-- | :--: | |
|||
| 2024/01/24 | 5.2.0-preview5.24024.3 | [release notes](5.2.0-preview5.md) | |
|||
| 2023/12/08 | 5.2.0-preview4.23342.2 | [release notes](5.2.0-preview4.md) | |
|||
| 2023/07/20 | 5.2.0-preview3.23201.1 | [release notes](5.2.0-preview3.md) | |
|||
| 2023/06/08 | 5.2.0-preview2.23159.1 | [release notes](5.2.0-preview2.md) | |
|||
| 2023/04/20 | 5.2.0-preview1.23109.1 | [release notes](5.2.0-preview1.md) | |
|||
# Release Notes |
|||
|
|||
## Microsoft.Data.SqlClient 5.2.0 released 28 February 2024 |
|||
|
|||
This update includes the following changes over the previous release: |
|||
|
|||
### Contributors |
|||
Thanks to the following public contributors. Their efforts toward this project are very much appreciated. |
|||
|
|||
- [Wraith2](https://github.com/Wraith2) |
|||
- [ErikEJ](https://github.com/ErikEJ) |
|||
- [kant2002](https://github.com/kant2002) |
|||
- [mattjohnsonpint](https://github.com/mattjohnsonpint) |
|||
- [azerios](https://github.com/azerios) |
|||
- [jinek](https://github.com/jinek) |
|||
- [christothes](https://github.com/christothes) |
|||
- [panoskj](https://github.com/panoskj) |
|||
- [saitama951](https://github.com/saitama951) |
|||
- [danielmarbach](https://github.com/danielmarbach) |
|||
- [wsugarman](https://github.com/wsugarman) |
|||
- [ViktorHofer](https://github.com/ViktorHofer) |
|||
- [emidah](https://github.com/emidah) |
|||
|
|||
### Added |
|||
|
|||
- Added a new `AccessTokenCallback` API to `SqlConnection`. [#1260](https://github.com/dotnet/SqlClient/pull/1260) [Read more](#added-new-property-accesstokencallback-to-sqlconnection) |
|||
- Added `SqlBatch` support on .NET 6+ [#1825](https://github.com/dotnet/SqlClient/pull/1825), [#2223](https://github.com/dotnet/SqlClient/pull/2223), [#2371](https://github.com/dotnet/SqlClient/pull/2371), [#2373](https://github.com/dotnet/SqlClient/pull/2373) [Read more](#added-new-property-sqlbatch-api) |
|||
- Added support of `SqlDiagnosticListener` on **.NET Standard**. [#1931](https://github.com/dotnet/SqlClient/pull/1931) |
|||
- Added new property `RowsCopied64` to `SqlBulkCopy`. [#2004](https://github.com/dotnet/SqlClient/pull/2004) [Read more](#added-new-property-rowscopied64-to-sqlbulkcopy) |
|||
- Added support for the `SuperSocketNetLib` registry option for Encrypt on .NET on Windows. [#2047](https://github.com/dotnet/SqlClient/pull/2047) |
|||
- Added the ability to generate debugging symbols in a separate package file [#2137](https://github.com/dotnet/SqlClient/pull/2137) |
|||
- Added Workload Identity authentication support [#2159](https://github.com/dotnet/SqlClient/pull/2159), [#2264](https://github.com/dotnet/SqlClient/pull/2264) |
|||
- Added support for Big Endian systems [#2170](https://github.com/dotnet/SqlClient/pull/2170) |
|||
- Added support for Georgian collation [#2194](https://github.com/dotnet/SqlClient/pull/2194) |
|||
- Added Localization support on .NET [#2210](https://github.com/dotnet/SqlClient/pull/2110) |
|||
- Added .NET 8 support [#2230](https://github.com/dotnet/SqlClient/pull/2230) |
|||
- 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) |
|||
|
|||
### Changed |
|||
|
|||
- Improved parsing buffered characters in `TdsParser`. [#1544](https://github.com/dotnet/SqlClient/pull/1544) |
|||
- Added Microsoft.SqlServer.Types to verify support for SqlHierarchyId and Spatial for .NET Core. [#1848](https://github.com/dotnet/SqlClient/pull/1848) |
|||
- Moved to new System.Data.SqlTypes APIs in **.NET 7** and upper. [#1934](https://github.com/dotnet/SqlClient/pull/1934) and [#1981](https://github.com/dotnet/SqlClient/pull/1981) |
|||
- Removed reference to Microsoft.Win32.Registry since it's shipped starting with .NET 6.0. [#1974](https://github.com/dotnet/SqlClient/pull/1974) |
|||
- Changed **[UseOneSecFloorInTimeoutCalculationDuringLogin](https://learn.microsoft.com/sql/connect/ado-net/appcontext-switches#enable-a-minimum-timeout-during-login)** App Context switch default to **true** and extended its effect to .NET and .NET Standard. [#2012](https://github.com/dotnet/SqlClient/pull/2012) |
|||
- Updated `Microsoft.Identity.Client` version from 4.47.2 to 4.53.0. [#2031](https://github.com/dotnet/SqlClient/pull/2031), [#2055](https://github.com/dotnet/SqlClient/pull/2055) |
|||
- Switched to the new .NET [NegotiateAuthentication](https://learn.microsoft.com/en-us/dotnet/api/system.net.security.negotiateauthentication?view=net-7.0) API on .NET 7.0 and above for SSPI token negotiation using Managed SNI. [#2063](https://github.com/dotnet/SqlClient/pull/2063) |
|||
- Removed `ignoreSniOpenTimeout` in open connection process on Windows. [#2067](https://github.com/dotnet/SqlClient/pull/2067) |
|||
- Enforce explicit ordinal for internal `StringComparison` operations. [#2068](https://github.com/dotnet/SqlClient/pull/2068) |
|||
- Improved error messages when validating server certificates in managed SNI (Linux/macOS) [#2060](https://github.com/dotnet/SqlClient/pull/2060) |
|||
- Improved CPU usage when `AppContext` switches are in use [#2227](https://github.com/dotnet/SqlClient/pull/2227) |
|||
- Upgraded `Azure.Identity` dependency version to [1.10.3](https://www.nuget.org/packages/Azure.Identity/1.10.3) to address [CVE-2023-36414](https://github.com/advisories/GHSA-5mfx-4wcx-rv27), [#2189](https://github.com/dotnet/SqlClient/pull/2189) |
|||
- Changed Microsoft.IdentityModel.JsonWebTokens and Microsoft.IdentityModel.Protocols.OpenIdConnect version 6.24.0 to 6.35.0 [#2290](https://github.com/dotnet/SqlClient/pull/2290) to address [CVE-2024-21319](https://www.cve.org/CVERecord?id=CVE-2024-21319) |
|||
- Updated `Microsoft.Data.SqlClient.SNI` (.NET Framework dependency) and `Microsoft.Data.SqlClient.SNI.runtime` (.NET/.NET Standard dependency) version to `v5.2.0`. [#2363](https://github.com/dotnet/SqlClient/pull/2363), which includes removing dead code and addressing static analysis warnings |
|||
- Code health improvements: [#1198](https://github.com/dotnet/SqlClient/pull/1198), [#1829](https://github.com/dotnet/SqlClient/pull/1829), [#1943](https://github.com/dotnet/SqlClient/pull/1943), [#1949](https://github.com/dotnet/SqlClient/pull/1949), [#1959](https://github.com/dotnet/SqlClient/pull/1959), [#1985](https://github.com/dotnet/SqlClient/pull/1985), [#2071](https://github.com/dotnet/SqlClient/pull/2071), [#2073](https://github.com/dotnet/SqlClient/pull/2073), [#2088](https://github.com/dotnet/SqlClient/pull/2088), [#2091](https://github.com/dotnet/SqlClient/pull/2091), [#2098](https://github.com/dotnet/SqlClient/pull/2098), [#2121](https://github.com/dotnet/SqlClient/pull/2121), [#2122](https://github.com/dotnet/SqlClient/pull/2122), [#2132](https://github.com/dotnet/SqlClient/pull/2132), [#2136](https://github.com/dotnet/SqlClient/pull/2136), [#2144](https://github.com/dotnet/SqlClient/pull/2144), [#2147](https://github.com/dotnet/SqlClient/pull/2147), [#2157](https://github.com/dotnet/SqlClient/pull/2157), [#2164](https://github.com/dotnet/SqlClient/pull/2164), [#2166](https://github.com/dotnet/SqlClient/pull/2166), [#2168](https://github.com/dotnet/SqlClient/pull/2168), [#2186](https://github.com/dotnet/SqlClient/pull/2186), [#2254](https://github.com/dotnet/SqlClient/pull/2254), [#2288](https://github.com/dotnet/SqlClient/pull/2288), [#2305](https://github.com/dotnet/SqlClient/pull/2305), [#2317](https://github.com/dotnet/SqlClient/pull/2317) |
|||
|
|||
### Fixed |
|||
|
|||
- Fixed Always Encrypted secure enclave retry logic for async queries. [#1988](https://github.com/dotnet/SqlClient/pull/1988) |
|||
- Fixed activity correlator to continue use of same GUID for connection activity. [#1997](https://github.com/dotnet/SqlClient/pull/1997) |
|||
- Fixed behavior when error class is greater than 20 on connection retry. [#1953](https://github.com/dotnet/SqlClient/pull/1953) |
|||
- Fixed error message when symmetric key decryption failed using Always Encrypted. [#1948](https://github.com/dotnet/SqlClient/pull/1948) |
|||
- Fixed TransactionScope connection issue when Enlist is enable, Pooling is disabled and network connection type is Redirect. [#1960](https://github.com/dotnet/SqlClient/pull/1960) |
|||
- Fixed TDS RPC error on large queries in SqlCommand.ExecuteReaderAsync. [#1936](https://github.com/dotnet/SqlClient/pull/1936) |
|||
- Fixed throttling of token requests by calling AcquireTokenSilent. [#1925](https://github.com/dotnet/SqlClient/pull/1925) |
|||
- Fixed Linux code coverage result in Build proj. [#1950](https://github.com/dotnet/SqlClient/pull/1950) |
|||
- Fixed NullReferenceException in GetBytesAsync. [#1906](https://github.com/dotnet/SqlClient/pull/1906) |
|||
- Fixed Transient fault handling issue with OpenAsync. [#1983](https://github.com/dotnet/SqlClient/pull/1983) |
|||
- Fixed invariant mode checks. [#1917](https://github.com/dotnet/SqlClient/pull/1917) |
|||
- Fixed GC behavior in TdsParser by adding array rental capability in TryReadPlpUnicodeChars. [#1866](https://github.com/dotnet/SqlClient/pull/1866) |
|||
- Fixed socket synchronization issue during connect in managed SNI. [#1029](https://github.com/dotnet/SqlClient/pull/1029) |
|||
- Fixed issue with `SqlConnectionStringBuilder` property indexer not supporting non-string values. [#2018](https://github.com/dotnet/SqlClient/pull/2018) |
|||
- Fixed `SqlDataAdapter.Fill` and configurable retry logic issue on .NET Framework. [#2084](https://github.com/dotnet/SqlClient/pull/2084) |
|||
- Fixed `SqlConnectionEncryptOption` type conversion by introducing the `SqlConnectionEncryptOptionConverter` attribute when using **appsettings.json** files. [#2057](https://github.com/dotnet/SqlClient/pull/2057) |
|||
- Fixed th-TH culture info issue on Managed SNI. [#2066](https://github.com/dotnet/SqlClient/pull/2066) |
|||
- Fixed an issue when using the Authentication option, but not encrypting on .NET Framework where the server certificate was being incorrectly validated [#2224](https://github.com/dotnet/SqlClient/pull/2224) |
|||
- Fixed a deadlock problem for distributed transactions when on .NET [#2161](https://github.com/dotnet/SqlClient/pull/2161) |
|||
- Fixed an issue with connecting to named instances on named pipes in managed SNI (Linux/macOS) [#2142](https://github.com/dotnet/SqlClient/pull/2142) |
|||
- Fixed LocalDb connection issue with an invalid source when using managed SNI [#2129](https://github.com/dotnet/SqlClient/pull/2129) |
|||
- Fixed an `AccessViolationException` when using a SQL Express user instance [#2101](https://github.com/dotnet/SqlClient/pull/2101) |
|||
- Fixed a metadata query issue when connecting to Azure SQL Edge [#2099](https://github.com/dotnet/SqlClient/pull/2099) |
|||
- Fixed file version information for .NET and .NET Standard binaries [#2093](https://github.com/dotnet/SqlClient/pull/2093) |
|||
- Fixed the SPN sent for a named instance when using Kerberos authentication on Linux/macOS [#2240](https://github.com/dotnet/SqlClient/pull/2240) |
|||
- Fixed connection to unsubscribe from transaction completion events before returning it to the connection pool [#2301](https://github.com/dotnet/SqlClient/pull/2301) |
|||
- Fixed InvalidCastException when reading an Always Encrypted date or time column [#2275](https://github.com/dotnet/SqlClient/pull/2275) |
|||
- Fixed token caching to prevent expired access tokens from being reused in a connection pool [#2273](https://github.com/dotnet/SqlClient/pull/2273) |
|||
|
|||
## New features |
|||
|
|||
### Added new property `SQLBatch API` |
|||
|
|||
```csharp |
|||
using Microsoft.Data.SqlClient; |
|||
|
|||
class Program |
|||
{ |
|||
static void Main() |
|||
{ |
|||
string str = "Data Source=(local);Initial Catalog=Northwind;" |
|||
+ "Integrated Security=SSPI;Encrypt=False"; |
|||
RunBatch(str); |
|||
} |
|||
|
|||
static void RunBatch(string connString) |
|||
{ |
|||
using var connection = new SqlConnection(connString); |
|||
connection.Open(); |
|||
|
|||
var batch = new SqlBatch(connection); |
|||
|
|||
const int count = 10; |
|||
const string parameterName = "parameter"; |
|||
for (int i = 0; i < count; i++) |
|||
{ |
|||
var batchCommand = new SqlBatchCommand($"SELECT @{parameterName} as value"); |
|||
batchCommand.Parameters.Add(new SqlParameter(parameterName, i)); |
|||
batch.BatchCommands.Add(batchCommand); |
|||
} |
|||
|
|||
// Optionally Prepare |
|||
batch.Prepare(); |
|||
|
|||
var results = new List<int>(count); |
|||
using (SqlDataReader reader = batch.ExecuteReader()) |
|||
{ |
|||
do |
|||
{ |
|||
while (reader.Read()) |
|||
{ |
|||
results.Add(reader.GetFieldValue<int>(0)); |
|||
} |
|||
} while (reader.NextResult()); |
|||
} |
|||
Console.WriteLine(string.Join(", ", results)); |
|||
} |
|||
} |
|||
``` |
|||
|
|||
### Added new property `RowsCopied64` to SqlBulkCopy |
|||
|
|||
SqlBulkCopy has a new property `RowsCopied64` which supports `long` value types. |
|||
|
|||
**Note that the existing `SqlBulkCopy.RowsCopied` behavior is unchanged. When the value exceeds `int.MaxValue`, `RowsCopied` can return a negative number.** |
|||
|
|||
Example usage: |
|||
|
|||
```C# |
|||
using (SqlConnection srcConn = new SqlConnection(srcConstr)) |
|||
using (SqlCommand srcCmd = new SqlCommand("select top 5 * from employees", srcConn)) |
|||
{ |
|||
srcConn.Open(); |
|||
using (DbDataReader reader = srcCmd.ExecuteReader()) |
|||
{ |
|||
using (SqlBulkCopy bulkcopy = new SqlBulkCopy(dstConn)) |
|||
{ |
|||
bulkcopy.DestinationTableName = dstTable; |
|||
SqlBulkCopyColumnMappingCollection ColumnMappings = bulkcopy.ColumnMappings; |
|||
|
|||
ColumnMappings.Add("EmployeeID", "col1"); |
|||
ColumnMappings.Add("LastName", "col2"); |
|||
ColumnMappings.Add("FirstName", "col3"); |
|||
|
|||
bulkcopy.WriteToServer(reader); |
|||
long rowsCopied = bulkcopy.RowsCopied64; |
|||
} |
|||
} |
|||
} |
|||
``` |
|||
|
|||
### Added new property `AccessTokenCallback` to SqlConnection |
|||
|
|||
SqlConnection supports `TokenCredential` authentication by introducing a new `AccessTokenCallback` property as a `Func<SqlAuthenticationParameters, CancellationToken,Task<SqlAuthenticationToken>>` delegate to return a federated authentication access token. |
|||
|
|||
Example usage: |
|||
|
|||
```C# |
|||
using Microsoft.Data.SqlClient; |
|||
using Azure.Identity; |
|||
|
|||
const string defaultScopeSuffix = "/.default"; |
|||
string connectionString = GetConnectionString(); |
|||
using SqlConnection connection = new SqlConnection(connectionString); |
|||
|
|||
connection.AccessTokenCallback = async (authParams, cancellationToken) => |
|||
{ |
|||
var cred = new DefaultAzureCredential(); |
|||
string scope = authParams.Resource.EndsWith(defaultScopeSuffix) ? authParams.Resource : authParams.Resource + defaultScopeSuffix; |
|||
AccessToken token = await cred.GetTokenAsync(new TokenRequestContext(new[] { scope }), cancellationToken); |
|||
return new SqlAuthenticationToken(token.Token, token.ExpiresOn); |
|||
} |
|||
|
|||
connection.Open(); |
|||
Console.WriteLine("ServerVersion: {0}", connection.ServerVersion); |
|||
Console.WriteLine("State: {0}", connection.State); |
|||
``` |
|||
|
|||
## Target Platform Support |
|||
|
|||
- .NET Framework 4.6.2+ (Windows x86, Windows x64) |
|||
- .NET 6.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) |
|||
- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) |
|||
|
|||
### Dependencies |
|||
|
|||
#### .NET Framework |
|||
|
|||
- Microsoft.Data.SqlClient.SNI 5.2.0 |
|||
- Azure.Identity 1.10.3 |
|||
- Microsoft.Identity.Client 4.56.0 |
|||
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0 |
|||
- Microsoft.IdentityModel.JsonWebTokens 6.35.0 |
|||
- System.Buffers 4.5.1 |
|||
- System.Configuration.ConfigurationManager 6.0.1 |
|||
- System.Runtime.InteropServices.RuntimeInformation 4.3.0 |
|||
- System.Text.Encoding.Web 6.0.0 |
|||
|
|||
#### .NET 6 |
|||
|
|||
- Microsoft.Data.SqlClient.SNI 5.2.0 |
|||
- Azure.Identity 1.10.3 |
|||
- Microsoft.Identity.Client 4.56.0 |
|||
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0 |
|||
- Microsoft.IdentityModel.JsonWebTokens 6.35.0 |
|||
- Microsoft.SqlServer.Server 1.0.0 |
|||
- System.Configuration.ConfigurationManager 6.0.1 |
|||
- System.Diagnostics.DiagnosticSource 6.0.1 |
|||
- System.Runtime.Caching 6.0.0 |
|||
|
|||
#### .NET 8 |
|||
|
|||
- Microsoft.Data.SqlClient.SNI 5.2.0 |
|||
- Azure.Identity 1.10.3 |
|||
- Microsoft.Identity.Client 4.56.0 |
|||
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0 |
|||
- Microsoft.IdentityModel.JsonWebTokens 6.35.0 |
|||
- Microsoft.SqlServer.Server 1.0.0 |
|||
- System.Configuration.ConfigurationManager 8.0.0 |
|||
- System.Diagnostics.DiagnosticSource 8.0.0 |
|||
- System.Runtime.Caching 8.0.0 |
|||
|
|||
#### .NET Standard 2.0 |
|||
|
|||
- Microsoft.Data.SqlClient.SNI 5.2.0 |
|||
- Azure.Identity 1.10.3 |
|||
- Microsoft.Identity.Client 4.56.0 |
|||
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0 |
|||
- Microsoft.IdentityModel.JsonWebTokens 6.35.0 |
|||
- Microsoft.SqlServer.Server 1.0.0 |
|||
- Microsoft.Win32.Registry 5.0.0 |
|||
- System.Buffers 4.5.1 |
|||
- System.Configuration.ConfigurationManager 6.0.1 |
|||
- System.Diagnostics.DiagnosticSource 6.0.1 |
|||
- System.Runtime.Caching 6.0.0 |
|||
- System.Text.Encoding.CodePages 6.0.0 |
|||
- System.Text.Encodings.Web 6.0.0 |
|||
- System.Runtime.Loader 4.3.0 |
|||
- System.Security.Cryptography.Cng 5.0.0 |
|||
- System.Security.Principal.Windows 5.0.0 |
|||
|
|||
#### .NET Standard 2.1 |
|||
|
|||
- Microsoft.Data.SqlClient.SNI 5.2.0 |
|||
- Azure.Identity 1.10.3 |
|||
- Microsoft.Identity.Client 4.56.0 |
|||
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0 |
|||
- Microsoft.IdentityModel.JsonWebTokens 6.35.0 |
|||
- Microsoft.SqlServer.Server 1.0.0 |
|||
- Microsoft.Win32.Registry 5.0.0 |
|||
- System.Configuration.ConfigurationManager 6.0.1 |
|||
- System.Diagnostics.DiagnosticSource 6.0.1 |
|||
- System.Runtime.Caching 6.0.0 |
|||
- System.Text.Encoding.CodePages 6.0.0 |
|||
- System.Text.Encodings.Web 6.0.0 |
|||
- System.Runtime.Loader 4.3.0 |
|||
- System.Security.Cryptography.Cng 5.0.0 |
|||
- System.Security.Principal.Windows 5.0.0 |
|||
|
@ -0,0 +1,18 @@ |
|||
# Microsoft.Data.SqlClient 5.2 Releases |
|||
|
|||
The following Microsoft.Data.SqlClient 5.2 stable releases have been shipped: |
|||
|
|||
| Release Date | Version | Notes | |
|||
| :-- | :-- | :--: | |
|||
| 2024/02/28 | 5.2.0 | [release notes](5.2.0.md) | |
|||
|
|||
The following Microsoft.Data.SqlClient 5.2 preview releases have been shipped: |
|||
|
|||
| Release Date | Version | Notes | |
|||
| :-- | :-- | :--: | |
|||
| 2024/01/24 | 5.2.0-preview5.24024.3 | [release notes](5.2.0-preview5.md) | |
|||
| 2023/12/08 | 5.2.0-preview4.23342.2 | [release notes](5.2.0-preview4.md) | |
|||
| 2023/07/20 | 5.2.0-preview3.23201.1 | [release notes](5.2.0-preview3.md) | |
|||
| 2023/06/08 | 5.2.0-preview2.23159.1 | [release notes](5.2.0-preview2.md) | |
|||
| 2023/04/20 | 5.2.0-preview1.23109.1 | [release notes](5.2.0-preview1.md) | |
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue