SqlClient

Microsoft.Data.SqlClient provides database connectivity to SQL Server for .NET applications.

MIT License

Stars
820
Committers
80

Bot releases are hidden (Show)

SqlClient - Preview Release v5.2.0-preview2.23159.1

Published by JRahnama over 1 year ago

[Preview Release 5.2.0-preview2.23159.1] - 2023-06-08

This update brings the below changes over the previous release:

Added

  • Added new property RowsCopied64 to SqlBulkCopy. #2004

Fixed

  • Fixed mixed synchronization issue in managed SNI. #1029
  • Fixed issue with SqlConnectionStringBuilder property indexer not supporting non-string values. #2018

Changed

For detailed release notes, refer to 5.2.0-preview2.md

SqlClient - Stable Release v2.1.6

Published by DavoudEshtehari over 1 year ago

[Stable release 2.1.6] - 2023-04-27

Fixed

  • Fixed TDS RPC error on large queries in SqlCommand.ExecuteReaderAsync. #1986
  • Fixed Default UTF8 collation conflict. #1989
  • Fixed async deadlock issue when sending attention fails due to network failure. #1767
SqlClient - Preview Release v5.2.0-preview1.23109.1

Published by Kaur-Parminder over 1 year ago

[Preview Release 5.2.0-preview1.23109.1] - 2023-04-20

This update brings the below changes over the v5.1 release:

Added

  • Added support of SqlDiagnosticListener on .NET Standard. #1931

Fixed

  • Fixed AE enclave retry logic for async queries. #1988
  • Fixed activity correlator to continue use of same GUID for connection activity. #1997
  • Fixed behavior when error class is greater than 20 on connection retry. #1953
  • Fixed error message when symmetric key decryption failed using Always Encrypted. #1948
  • Fixed TransactionScope connection issue when Enlist is enable, Pooling is disabled and network connection type is Redirect. #1960
  • Fixed TDS RPC error on large queries in SqlCommand.ExecuteReaderAsync. #1936
  • Fixed throttling of token requests by calling AcquireTokenSilent. #1925
  • Fixed Linux code coverage result in Build proj. #1950
  • Fixed NullReferenceException in GetBytesAsync. #1906
  • Fixed Transient fault handling issue with OpenAsync. #1983
  • Fixed invariant mode checks. #1917
  • Fixed GC behavior in TdsParser by adding array rental capability in TryReadPlpUnicodeChars. #1866

Changed

  • Updated Azure Identity version from 1.7.0 to 1.8.0. #1921
  • Improved parsing buffered characters in TdsParser. #1544
  • Removed reference to Microsoft.Win32.Registry since it's shipped starting with .NET 6.0. #1974
  • Added Microsoft.SqlServer.Types to verify support for SqlHierarchyId and Spatial for .NET Core. #1848
  • Code health improvements:#1943#1949#1198#1829

For detailed release notes, refer to 5.2.0-preview1.md

SqlClient - Stable Release v4.0.3

Published by DavoudEshtehari over 1 year ago

[Stable release 4.0.3] - 2023-04-20

Fixed

  • Fixed throttling of token requests by calling AcquireTokenSilent in AAD Integrated/Password flows when the account is already cached.#1995
  • Fixed TDS RPC error on large queries in SqlCommand.ExecuteReaderAsync.#1987
SqlClient - Stable Release v5.0.2

Published by lcheunglci over 1 year ago

[Stable release 5.0.2] - 2023-03-31

Fixed

  • Fixed memory leak regression from #1785 using a DisposableTemporaryOnStack struct. #1980
  • Fixed TransactionScope connection issue when Enlist is enabled, Pooling is disabled, and Network Connection Type is set to Redirect. #1978
  • Fixed an incorrect exception when a symmetric key fails to decrypt a column using Always Encrypted. #1977
  • Fixed TDS RPC error on large queries in SqlCommand.ExecuteReaderAsync. #1976
  • Fixed deadlock when using SinglePhaseCommit with distributed transactions. #1975

For summary of all changes over v5.0.1, refer to 5.0.2.md

SqlClient - Stable Release v5.1.1

Published by lcheunglci over 1 year ago

[Stable release 5.1.1] - 2023-03-28

Fixed

  • Fixed an incorrect exception when a symmetric key fails to decrypt a column using Always Encrypted. #1968
  • Fixed TransactionScope connection issue when Enlist is enabled, Pooling is disabled, and Network Connection Type is set to Redirect. #1967
  • Fixed throttling of token requests by calling AcquireTokenSilent. #1966
  • Fixed TDS RPC error on large queries in SqlCommand.ExecuteReaderAsync. #1965
  • Fixed NullReferenceException in GetBytesAsync. #1964

For summary of all changes over v5.1.0, refer to 5.1.1.md

SqlClient - Stable Release v3.1.3

Published by Kaur-Parminder over 1 year ago

[Stable release 3.1.3] - 2023-03-10

Fixed

  • Fixed throttling of token requests by calling AcquireTokenSilent in AAD Integrated/Password flows when the account is already cached.#1926
  • Fixed TDS RPC error on large queries in SqlCommand.ExecuteReaderAsync.#1939

For summary of all changes over v3.1.2, refer to 3.1.3.md

SqlClient - Stable Release v3.1.2

Published by Kaur-Parminder over 1 year ago

[Stable release 3.1.2] - 2023-02-03

Added

  • Added Windows ARM64 support when targeting .NET Framework. #1908

Fixed

  • Fixed thread safety of transient error list in configurable retry logic. #1911
  • Fixed deadlock when using SinglePhaseCommit with distributed transactions. #1912
  • Fixed Default UTF8 collation conflict. #1910
  • Added CommandText length validation when using stored procedure command types. #1909

For summary of all changes over v3.1.1, refer to 3.1.2.md

SqlClient - Stable Release v5.1.0

Published by lcheunglci over 1 year ago

Breaking changes

Added

  • Added support for .NET 6.0. #1704
  • Added support for DateOnly and TimeOnly for SqlParameter value and GetFieldValue. #1813
  • Added support for TLS 1.3 on .NET Core and native SNI. #1821
  • Added ServerCertificate setting for Encrypt=Mandatory or Encrypt=Strict. #1822
  • Added Windows ARM64 support when targeting .NET Framework. #1828

Fixed

  • Fixed thread safety of transient error list in configurable retry logic. #1882
  • Fixed deadlock when using SinglePhaseCommit with distributed transactions. #1801
  • Fixed Dedicated Admin Connections (DAC) to localhost in managed SNI #1865
  • Fixed memory leak regression from #1781 using a DisposableTemporaryOnStack struct. #1818
  • Fixed ReadAsync() behavior to register Cancellation token action before streaming results. #1781
  • Fixed NullReferenceException when assigning null to SqlConnectionStringBuilder.Encrypt. #1778
  • Fixed missing HostNameInCertificate property in .NET Framework Reference Project. #1776
  • Fixed async deadlock issue when sending attention fails due to network failure. #1766
  • Fixed failed connection requests in ConnectionPool in case of PoolBlock. #1768
  • Fixed hang on infinite timeout and managed SNI. #1742
  • Fixed Default UTF8 collation conflict. #1739

Changed

  • Updated Microsoft.Data.SqlClient.SNI (.NET Framework dependency) and Microsoft.Data.SqlClient.SNI.runtime (.NET Core/Standard dependency) version to 5.1.0. #1889 which includes fix for AppDomain crash in issue #1418, TLS 1.3 Support, removal of ARM32 binaries, and support for the ServerCertificate option. #1822 Read more
  • Reverted "Excluding unsupported TLS protocols" for issue #1151 (i.e. removed Switch.Microsoft.Data.SqlClient.EnableSecureProtocolsByOS) by adding support for TLS 1.3. #1824
  • Changed the SqlConnectionEncryptOption string parser to public. #1771
  • Converted ExecuteNonQueryAsync to use async context object. #1692
  • Code health improvements #1867 #1849 #1812 #1520 #1604 #1598 #1595 #1443

For summary of all changes over v5.0, refer to 5.1.0.md

SqlClient - Preview Release 5.1.0-preview2.22314.2

Published by lcheunglci almost 2 years ago

[Preview Release 5.1.0-preview2.22314.2] - 2022-11-10

This update brings the below changes over the previous release:

Breaking changes over preview release v5.1.0-preview1

  • Add support for .NET 6.0 and Dropped support for .NET Core 3.1. #1704 #1823

Added

  • Added support for DateOnly and TimeOnly for SqlParameter value and GetFieldValue. #1813
  • Added support for TLS 1.3 for .NET Core and SNI Native. #1821
  • Added ServerCertificate support for Encrypt=Mandatory or Encrypt=Strict. #1822
  • Added Windows ARM64 support when targeting .NET Framework. #1828

Fixed

  • Fixed memory leak regression from #1781 using a DisposableTemporaryOnStack struct. #1818

Changed

  • Updated Microsoft.Data.SqlClient.SNI (.NET Framework dependency) and Microsoft.Data.SqlClient.SNI.runtime (.NET Core/Standard dependency) version to 5.1.0-preview2.22311.2. #1831 which includes the fix for the TLS 1.3 timeout and double handshake issue, removal of ARM32 binaries, and support for the ServerCertificate option. #1822
  • Reverted "Excluding unsupported TLS protocols" for issue #1151 (i.e. removed Switch.Microsoft.Data.SqlClient.EnableSecureProtocolsByOS) by adding support for TLS 1.3. #1824
  • Code health improvements #1812 #1520

For detailed release notes, refer to 5.1.0-preview2.md

SqlClient - Preview Release v5.1.0-preview1.22279.3

Published by DavoudEshtehari almost 2 years ago

[Preview Release 5.1.0-preview1.22279.3] - 2022-10-19

This update brings the below changes over the stable release v5.0.0:

Fixed

  • Fixed ReadAsync() behavior to register Cancellation token action before streaming results. #1781
  • Fixed NullReferenceException when assigning null to SqlConnectionStringBuilder.Encrypt. #1778
  • Fixed missing HostNameInCertificate property in .NET Framework Reference Project. #1776
  • Fixed async deadlock issue when sending attention fails due to network failure. #1766
  • Fixed failed connection requests in ConnectionPool in case of PoolBlock. #1768
  • Fixed hang on infinite timeout and managed SNI. #1742
  • Fixed Default UTF8 collation conflict. #1739

Changed

  • Updated Microsoft.Data.SqlClient.SNI (.NET Framework dependency) and Microsoft.Data.SqlClient.SNI.runtime (.NET Core/Standard dependency) version to 5.1.0-preview1.22278.1. #1787 which includes TLS 1.3 Support and fix for AppDomain crash in issue #1418
  • Changed the SqlConnectionEncryptOption string parser to public. #1771
  • Converted ExecuteNonQueryAsync to use async context object. #1692
  • Code health improvements #1604 #1598 #1595 #1443

Known issues

  • When using Encrypt=Strict with TLS v1.3, the TLS handshake occurs twice on initial connection on .NET Framework due to a timeout during the TLS handshake and a retry helper re-establishes the connection; however, on .NET Core, it will throw a System.ComponentModel.Win32Exception (258): The wait operation timed out. and is being investigated. If you're using Microsoft.Data.SqlClient with .NET Core on Windows 11, you will need to enable the managed SNI on Windows context switch using following statement AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.UseManagedNetworkingOnWindows", true); to use TLS v1.3 or disabling TLS 1.3 from the registry by assigning 0 to the following HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.3\Client\Enabled registry key and it'll use TLS v1.2 for the connection. This will be fixed in a future release.

For detailed release notes, refer to 5.1.0-preview1.md

SqlClient - Stable Release v5.0.1

Published by Kaur-Parminder about 2 years ago

Fixed

  • Fixed missing HostNameInCertificate connection string property in .NET Framework. #1782
  • Fixed async deadlock issue when sending attention fails due to network failure. #1783
  • Fixed Null Reference Exception on assigning null to SqlConnectionStringBuilder.Encrypt. #1784
  • Fixed ReadAsync() behavior to register Cancellation token action before streaming results. #1785
  • Fixed hang on infinite timeout and managed SNI. #1798
  • Fixed Default UTF8 collation conflict. #1799

Changed

  • Updated Microsoft.Data.SqlClient.SNI (.NET Framework dependency) and Microsoft.Data.SqlClient.SNI.runtime (.NET Core/Standard dependency) version to 5.0.1 #1795, which includes the fix for AppDomain crash in issue #1418.
SqlClient - Stable Release v4.1.1

Published by DavoudEshtehari about 2 years ago

[Stable release 4.1.1] - 2022-09-13

Fixed

  • Fixed connection failure by not requiring Certificate Revocation List (CRL) check during authentication. #1706
  • Parallelize SSRP requests on Linux and macOS when MultiSubNetFailover is specified. #1708, #1746
  • Added CommandText length validation when using stored procedure command types. #1709
  • Fixed NullReferenceException during Azure Active Directory authentication. #1710
  • Fixed null SqlBinary as rowversion. #1712
  • Fixed table's collation overriding with default UTF8 collation. #1749

Changed

  • Updated Microsoft.Data.SqlClient.SNI (.NET Framework dependency) and Microsoft.Data.SqlClient.SNI.runtime (.NET Core/Standard dependency) version to v4.0.1 #1755, which includes the fix for AppDomain crash introducing in issue #1418
  • Various code improvements: #1711
SqlClient - Stable Release v4.0.2

Published by DavoudEshtehari about 2 years ago

[Stable release 4.0.2] - 2022-09-13

Fixed

  • Fixed connection failure by not requiring Certificate Revocation List (CRL) check during authentication. #1718
  • Parallelize SSRP requests on Linux and macOS when MultiSubNetFailover is specified. #1720, #1747
  • Added CommandText length validation when using stored procedure command types. #1721
  • Fixed NullReferenceException during Azure Active Directory authentication. #1722
  • Fixed null SqlBinary as rowversion. #1724
  • Fixed table's collation overriding with default UTF8 collation. #1750

Changed

  • Updated Microsoft.Data.SqlClient.SNI (.NET Framework dependency) and Microsoft.Data.SqlClient.SNI.runtime (.NET Core/Standard dependency) version to v4.0.1 #1754, which includes the fix for AppDomain crash introducing in issue #1418
  • Various code improvements: #1723
SqlClient - Stable Release v2.1.5

Published by DavoudEshtehari about 2 years ago

[Stable release 2.1.5] - 2022-08-30

Fixed

  • Added CommandText length validation when using stored procedure command types. #1726
  • Fixed Kerberos authentication failure when using .NET 6. #1727
  • Removed union overlay design and used reflection in SqlTypeWorkarounds. #1729
SqlClient - Stable Release v3.1.1

Published by JRahnama about 2 years ago

[Stable release 3.1.1] - 2022-08-12

Fixed

  • Fixed null SqlBinary as rowversion. #1700
  • Fixed Kerberos authentication failure when using .NET 6. #1696
  • Fixed NullReferenceException during Azure Active Directory authentication. #1695
  • Removed union overlay design and use reflection in SqlTypeWorkarounds. #1699
SqlClient - Stable Release v5.0.0

Published by lcheunglci about 2 years ago

Added

  • Added support for TDS 8. To use TDS 8, users should specify Encrypt=Strict in the connection string. #1608
  • Added TDS 8 version for TDSLogin. #1657

Fixed

  • Fixed null SqlBinary as rowversion. #1688
  • Fixed KeyNotFoundException for the FailoverPartner key on SQL servers with availability group configured. #1614
  • Fixed small inconsistency between netcore and netfx for EncryptionOptions. #1672
  • Fixed Microsoft.SqlServer.Server netcore project package reference. #1654

Changed

  • Updated AuthProviderInfo struct to be matched the changes in native SNI for TDS 8 server certificate validation. #1680
  • Updated default system protocol for TDS 8 on managed code. #1678
  • Updated Microsoft.Data.SqlClient.SNI (.NET Framework dependency) and Microsoft.Data.SqlClient.SNI.runtime (.NET Core/Standard dependency) version to 5.0.0. #1680
  • Updated IdentityModel dependency from 6.8.0 to 6.21.0 and IdentityClient from 4.32.2 to 4.45.0. #1646
  • Changed from union overlay design to reflected interfaces for SqlTypes. 1647

For summary of all changes over v4.1, refer to 5.0.0.md

SqlClient - Preview Release v5.0.0-preview3

Published by Kaur-Parminder over 2 years ago

[Preview Release 5.0.0-preview3.22168.1] - 2022-06-16

Breaking changes over preview release v5.0.0-preview2

  • Added a dependency on the Microsoft.SqlServer.Server package. This new dependency may cause namespace conflicts if your application references that namespace and still has package references (direct or indirect) to System.Data.SqlClient from .NET Core.
  • Dropped classes from the Microsoft.Data.SqlClient.Server namespace and replaced them with supported types from the Microsoft.SqlServer.Server package.#1585 The affected classes and enums are:
    • Microsoft.Data.SqlClient.Server.IBinarySerialize -> Microsoft.SqlServer.Server.IBinarySerialize
    • Microsoft.Data.SqlClient.Server.InvalidUdtException -> Microsoft.SqlServer.Server.InvalidUdtException
    • Microsoft.Data.SqlClient.Server.SqlFacetAttribute -> Microsoft.SqlServer.Server.SqlFacetAttribute
    • Microsoft.Data.SqlClient.Server.SqlFunctionAttribute -> Microsoft.SqlServer.Server.SqlFunctionAttribute
    • Microsoft.Data.SqlClient.Server.SqlMethodAttribute -> Microsoft.SqlServer.Server.SqlMethodAttribute
    • Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute -> Microsoft.SqlServer.Server.SqlUserDefinedAggregateAttribute
    • Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute -> Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute
    • (enum) Microsoft.Data.SqlClient.Server.DataAccessKind -> Microsoft.SqlServer.Server.DataAccessKind
    • (enum) Microsoft.Data.SqlClient.Server.Format -> Microsoft.SqlServer.Server.Format
    • (enum) Microsoft.Data.SqlClient.Server.SystemDataAccessKind -> Microsoft.SqlServer.Server.SystemDataAccessKind

Added

  • Added support for TDS 8. To use TDS 8, users should specify Encrypt=Strict in the connection string. Strict mode disables TrustServerCertificate (always treated as False in Strict mode). HostNameInCertificate has been added to help some Strict mode scenarios. #1608
  • Added support for specifying Server SPN and Failover Server SPN on the connection. #1607
  • Added support for aliases when targeting .NET Core on Windows. #1588

Fixed

Changed

For detailed release notes, refer 5.0.0-preview3.md

SqlClient - Preview Release v5.0.0-preview2

Published by johnnypham over 2 years ago

Breaking changes over preview release v5.0.0-preview1

  • Dropped support for .NET Framework 4.6.1 #1574

Fixed

  • Fixed connection failure by skipping Certificate Revocation List (CRL) check during authentication #1559

Changed

  • Updated Microsoft.Data.SqlClient.SNI (.NET Framework dependency) and Microsoft.Data.SqlClient.SNI.runtime (.NET Core/Standard dependency) version to 5.0.0-preview2.22084.1. #1563
  • Updated Azure.Identity version to 1.5.0 and Microsoft.Identity.Client version to 4.30.1 #1462
  • Replaced AlwaysEncryptedAttestationException with SqlException #1515
  • Improved error message when adding wrong type to SqlParameterCollection #1547
  • Code health improvements #1343 #1370 #1371 #1438 #1483

For detailed release notes, refer 5.0.0-preview2.md

SqlClient - Stable Release v3.1.0

Published by DavoudEshtehari over 2 years ago

Added

  • Added new Attestation Protocol None for VBS enclave types. This protocol will allow users to forgo enclave attestation for VBS enclaves. #1539
  • Included 42108 and 42109 error codes to retriable transient errors list. #1560

Fixed

  • Changed EnclaveDelegate.Crypto GetEnclaveProvider to use a thread safe concurrent dictionary. #1564

For detailed release notes, refer to 3.1.0.md