This update brings the below changes over the previous release:
- Changed
Encrypt
connection string property to betrue
by default. #1210 Read more - The driver now throws
SqlException
replacingAggregateException
for active directory authentication modes. #1213 - Dropped obsolete
Asynchronous Processing
connection property from .NET Framework. #1148
- Added
SqlCommand.EnableOptimizedParameterBinding
property that when enabled increases performance for commands with very large numbers of parameters. #1041 Read more - Included
42108
and42109
error codes to retriable transient errors list. #1215 - Added new App Context switch to use OS enabled client protocols only. #1168 Read more
- Added
PoolBlockingPeriod
connection property support in .NET Standard. #1181 - Added support for
SqlDataReader.GetColumnSchema()
in .NET Standard. #1181 - Added PropertyGrid support with component model annotations to
SqlConnectionStringBuilder
properties for .NET Core. #1152
- Fixed issue with connectivity when TLS 1.3 is enabled on client and server. #1168
- Fixed issue with connection encryption to ensure connections fail when encryption is required. #1210 Read more
- Fixed issue where connection goes to unusable state. #1128
- Fixed recursive calls to
RetryLogicProvider
when callingSqlCommand.ExecuteScalarAsync
. #1220 - Fixed async deadlock scenarios in web contexts with configurable retry logic provider. #1220
- Fixed
EntryPointNotFoundException
inInOutOfProcHelper
constructor. #1120 - Fixed async thread blocking issues on
SqlConnection.Open()
for active directory authentication modes. #1213 - Fixed driver behavior for Always Encrypted with secure enclaves to not fail when no user parameters have been provided. #1115
- Fixed bug with
LegacyRowVersionNullBehavior
App Context switch. #1182 - Fixed issues in Strings.resx file containing error messages. #1136 #1178
- Updated error code to match with Windows when certificate validation fails in non-Windows client environments. #1130
- Removed designer attributes from
SqlCommand
andSqlDataAdapter
. #1132 - Updated configurable retry logic default retriable error list. #1125
- Improved performance by changing
SqlParameter
bool fields to flags. #1064 - Improved performance by implementing static delegates. #1060
- Optimized async method allocations in .NET Framework by porting changes from .NET Core. #1084
- Various code improvements #902 #925 #933 #934 #1024 #1057 #1122 #1133 #1134 #1141 #1187 #1188 #1223 #1225 #1226
The default value of the Encrypt
connection setting has been changed from false
to true
. With the growing use of cloud databases and the need to ensure those connections are secure, it's time for this backwards-compatibility-breaking change.
In scenarios where client encryption libraries were disabled or unavailable, it was possible for unencrypted connections to be made when Encrypt was set to true or the server required encryption.
TLS 1.3 is not supported by the driver; therefore, it has been removed from the supported protocols list by default. Users can switch back to forcing use of Operating System's client protocols, by enabling the App Context switch below:
Switch.Microsoft.Data.SqlClient.UseSystemDefaultSecureProtocols
Microsoft.Data.SqlClient introduces new SqlCommand
API, EnableOptimizedParameterBinding
to improve performance of queries with large number of parameters. This property is disabled by default. When set to true
, parameter names will not be sent to the SQL server when the command is executed.
public class SqlCommand
{
public bool EnableOptimizedParameterBinding { get; set; }
}
- .NET Framework 4.6.1+ (Windows x86, Windows x64)
- .NET Core 2.1+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS)
- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS)
- Microsoft.Data.SqlClient.SNI 4.0.0-preview1.21232.1
- Azure.Identity 1.3.0
- Microsoft.Identity.Client 4.22.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0
- Microsoft.IdentityModel.JsonWebTokens 6.8.0
- System.Configuration.ConfigurationManager 5.0.0
- System.Text.Encodings.Web 4.7.2
- System.Runtime.InteropServices.RuntimeInformation 4.3.0
- Microsoft.Data.SqlClient.SNI.runtime 4.0.0-preview1.21232.1
- Microsoft.Win32.Registry 5.0.0
- System.Security.Principal.Windows 5.0.0
- System.Text.Encoding.CodePages 5.0.0
- System.Text.Encodings.Web 4.7.2
- System.Diagnostics.DiagnosticSource 5.0.0
- System.Configuration.ConfigurationManager 5.0.0
- System.Runtime.Caching 5.0.0
- Azure.Identity 1.3.0
- Microsoft.Identity.Client 4.22.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0
- Microsoft.IdentityModel.JsonWebTokens 6.8.0
- Microsoft.Data.SqlClient.SNI.runtime 4.0.0-preview1.21232.1
- Microsoft.Win32.Registry 5.0.0
- System.Buffers 4.5.1
- System.Memory 4.5.4
- System.Security.Principal.Windows 5.0.0
- System.Text.Encoding.CodePages 5.0.0
- System.Text.Encodings.Web 4.7.2
- System.Runtime.Caching 5.0.0
- Azure.Identity 1.3.0
- Microsoft.Identity.Client 4.22.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0
- Microsoft.IdentityModel.JsonWebTokens 6.8.0
- System.Configuration.ConfigurationManager 5.0.0
- System.Runtime.Loader 4.3.0