Skip to content

Latest commit

 

History

History
145 lines (119 loc) · 6.82 KB

5.2.0-preview4.md

File metadata and controls

145 lines (119 loc) · 6.82 KB

Release Notes

[Preview Release 5.2.0-preview4.23342.2] - 2023-12-08

This update brings the below changes over the previous release:

Contributors

Thanks to the following public contributors. Their efforts toward this project are very much appreciated.

Added

  • Added SqlBatch support on .NET 6+#1825, #2223
  • Added Workload Identity authentication support #2159, #2264
  • Added Localization support on .NET #2210
  • Added support for Georgian collation #2194
  • Added support for Big Endian systems #2170

Changed

  • Updated Microsoft.Data.SqlClient.SNI (.NET Framework dependency) and Microsoft.Data.SqlClient.SNI.runtime (.NET/.NET Standard dependency) version to v5.2.0-preview1.23340.1. #2257, which includes removing dead code and addressing static analysis warnings
  • Improved CPU usage when AppContext switches are in use #2227
  • Upgraded Azure.Identity dependency version to 1.10.3 to address CVE-2023-36414, #2188
  • Improved error messages when validating server certificates in managed SNI (Linux/macOS) #2060

Fixed

  • Fixed an issue when using the Authentication option, but not encrypting on .NET Framework where the server certificate was being incorrectly validated #2224
  • Fixed a deadlock problem for distributed transactions when on .NET #2161
  • Fixed an issue with connecting to named instances on named pipes in managed SNI (Linux/macOS)#2142
  • Fixed LocalDb connection issue with an invalid source when using managed SNI #2129
  • Fixed an AccessViolationException when using a SQL Express user instance #2101
  • Fixed a metadata query issue when connecting to Azure SQL Edge #2099
  • Fixed file version information for .NET and .NET Standard binaries#2093
  • Fixed the SPN sent for a named instance when using Kerberos authentication on Linux/macOS #2240
  • Various code improvements #2091, #2098, #2121, #2122, #2132, #2136, #2144, #2147, #2157, #2164, #2166, #2168, #2186

SQLBatch API

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));
    }
}

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-preview1.23340.1
  • Azure.Identity 1.10.3
  • Microsoft.Identity.Client 4.56.0
  • Microsoft.IdentityModel.JsonWebTokens 6.24.0
  • Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.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

  • Microsoft.Data.SqlClient.SNI 5.2.0-preview1.23340.1
  • Azure.Identity 1.10.3
  • Microsoft.Identity.Client 4.56.0
  • Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0
  • Microsoft.IdentityModel.JsonWebTokens 6.24.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
  • System.Text.Encoding.CodePages 6.0.0
  • System.Text.Encodings.Web 6.0.0

.NET Standard

  • Microsoft.Data.SqlClient.SNI 5.2.0-preview1.23340.1
  • Azure.Identity 1.10.3
  • Microsoft.Identity.Client 4.56.0
  • Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0
  • Microsoft.IdentityModel.JsonWebTokens 6.24.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