Skip to main content
Microsoft.Data.SqlClient package icon

Microsoft.Data.SqlClient

Provides the data provider for SQL Server. These classes provide access to versions of SQL Server and encapsulate database-specific protocols, including tabular data stream (TDS) Commonly Used Types: Microsoft.Data.SqlClient.SqlConnection Microsoft.Data.SqlClient.SqlException Microsoft.Data.SqlClient.SqlParameter Microsoft.Data.SqlClient.SqlDataReader Microsoft.Data.SqlClient.SqlCommand Microsoft.Data.SqlClient.SqlTransaction Microsoft.Data.SqlClient.SqlParameterCollection Microsoft.Data.SqlClient.SqlClientFactory When using NuGet 3.x this package requires at least version 3.4.

Total Downloads
1.5B
1,534,406,052
Published
Sep 21, 2021
Latest stable version

Install

.NET CLI
dotnet add package Microsoft.Data.SqlClient --version 2.1.4
Package Manager Console
Install-Package Microsoft.Data.SqlClient -Version 2.1.4
PackageReference
<PackageReference Include="Microsoft.Data.SqlClient" Version="2.1.4" />

Frameworks

.NETFramework4.6 .NETCoreApp2.1 .NETCoreApp3.1 .NETStandard2.0 .NETStandard2.1

Dependencies

[2.1.1, )
[4.21.1, )
[6.8.0, )
[4.7.0, )
[4.7.0, )
[4.7.0, )
[4.7.0, )
[4.7.0, )
[4.21.1, )
[4.7.0, )
[4.7.0, )
[4.7.0, )
[4.7.0, )
[4.7.0, )
[4.21.1, )
[2.1.1, )
[4.7.0, )
System.Buffers
.NETStandard2.0
[4.5.1, )
System.Memory
.NETStandard2.0
[4.5.4, )
[4.7.0, )
[4.7.0, )
System.Runtime.Caching
.NETStandard2.0
[4.7.0, )
[4.21.1, )
[6.8.0, )
[2.1.1, )
[4.7.0, )
System.Buffers
.NETStandard2.1
[4.5.1, )
System.Memory
.NETStandard2.1
[4.5.4, )
[4.7.0, )
[4.7.0, )
System.Runtime.Caching
.NETStandard2.1
[4.7.0, )
[4.21.1, )
[6.8.0, )

Adoption guide

Workloads running on SQL Server family platforms that need current security and connectivity features.

Databases guide
Why it appears in the guide: Modern SQL Server data provider for .NET with active support for SQL Server and Azure SQL scenarios. Trade-off: Provider behavior and defaults should be validated during major version upgrades.

NuGet marks this package as deprecated. Review the publisher's migration guidance before adopting it.

Published vulnerability advisories exist for this version. Read the advisory and choose a remediated version before release.

Compatibility metadata lists 5 target frameworks; confirm the exact target used by your application.

The published metadata declares 44 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.