Microsoft.Data.SqlClient 3.0 Preview 3 has been released. This release contains improvements and updates to the Microsoft.Data.SqlClient data provider for SQL Server.
Our plan is to provide GA releases twice a year with two preview releases in between. This cadence should provide time for feedback and allow us to deliver features and fixes in a timely manner. This third 3.0 preview includes many fixes and changes over the previous 3.0 Preview 2 release.
Please note the first item in the list of breaking changes from previous GA releases. If you use Azure Managed Identity authentication with a user-assigned identity, you will need to update your connection information.
Breaking Changes over preview release 3.0.0-preview1
- For User-Assigned, Azure Managed Identity (MSI) authentication, the `User Id` connection property now requires `Client Id` instead of `Object Id` [read more about the new Azure.Identity library dependency]
- `SqlDataReader` now returns a `DBNull` value instead of an empty `byte`. Legacy behavior can be enabled by setting `AppContext` switch **Switch.Microsoft.Data.SqlClient.LegacyRowVersionNullBehavior** [read more about this change]
Preview 3 also includes many bug fixes and performance improvements. For the full list of changes in Microsoft.Data.SqlClient 3.0 Preview 3, please see the Release Notes.
If you missed our 3.0 Preview 1 announcement, the most notable new feature in 3.0 is Configurable Retry Logic.
Configurable retry logic is available when you've enabled an app context switch. Configurable retry logic builds significantly more transient error handling functionality into SqlClient than existed previously. It will allow you to retry connection and command executions based on configurable settings. Since it is even configurable outside of your code, it can help make existing applications more resilient to transient errors that you might encounter in real-world use.
For a detailed look into this feature, check out the blog post Introducing Configurable Retry Logic in Microsoft.Data.SqlClient v3.0.0-Preview1.
Other changes in preview 3 include:
- Added support for "Active Directory Default" authentication mode #1043
- Added support for connection-level and command-level registration of custom key store providers to enable multi-tenant applications to control key store access #1045 #1056 #1078
- Added IP address preference support for TCP connections #1015
- Fixed corrupted connection issue when an exception occurs during RPC execution with TVP types #1068
- Fixed race condition issues between SinglePhaseCommit and TransactionEnded events #1042
To try out the new package, add a NuGet reference to Microsoft.Data.SqlClient in your application and pick the 3.0 preview 3 version.
We appreciate the time and effort you spend checking out our previews. It makes the final product that much better. If you encounter any issues or have any feedback, head over to the SqlClient GitHub repository and submit an issue.