SqlPackage runs on Windows, macOS, and Linux, and is available to install through dotnet tool
or as a standalone zip download. For details about the latest release, see the release notes.
SqlPackage is developed and released for both .NET 8 and .NET Framework. Installing the .NET 8 SqlPackage version is recommended via the convenient dotnet tool
method, which is cross-platform and easy to update, or via the portable self-contained .zip download. The .NET 8 SqlPackage releases benefit from the continual advances to the performance and scalability of .NET as part of the focus on for modern applications, which contrasts to the maintenance support of .NET Framework for Windows. The .NET Framework version is only available as a .msi Windows installer.
Note
Previously, SqlPackage had a distinct version number (19) and build number (160.x). Beginning with version 161, the version number of SqlPackage matches the DacFx version number it's associated with (for example, 162.0.52).
Installation, cross-platformInstalling SqlPackage as a dotnet tool requires the .NET SDK to be installed on your machine. Installing SqlPackage as a global tool makes it available on your path as sqlpackage
and is the recommended method to install SqlPackage for Windows, macOS, and Linux. SqlPackage is available as a dotnet tool for .NET 8 and later versions.
To install SqlPackage as a global .NET tool, run the following command:
dotnet tool install -g microsoft.sqlpackage
More information on the options available with the dotnet tool install
command can be found in the dotnet tool install documentation.
To update SqlPackage to the latest version, run the following command:
dotnet tool update -g microsoft.sqlpackage
To uninstall SqlPackage, run the following command:
dotnet tool uninstall -g microsoft.sqlpackage
Troubleshoot installation
If you encounter issues during installation, follow these steps:
Ensure .NET SDK is installed: Verify that the .NET SDK is installed on your machine by running the following command:
dotnet --list-sdks
If the .NET SDK isn't listed, download and install it from the .NET SDK download page.
Verify NuGet source configuration: SqlPackage is published to nuget.org
, a public NuGet feed. You may encounter an error indicating that microsoft.sqlpackage
can't be found:
microsoft.sqlpackage is not found in NuGet feeds C:\Program Files(x86)\Microsoft SDKs\NuGetPackages\
Ensure that nuget.org
is a configured NuGet source for dotnet. List the configured NuGet sources by running:
dotnet nuget list source
This command should display a list of NuGet sources. Look for nuget.org
in the output, which is typically listed as https://api.nuget.org/v3/index.json
. If nuget.org
isn't listed, add it as a NuGet source using the following command:
dotnet nuget add source https://api.nuget.org/v3/index.json
Retry installation: After verifying the .NET SDK installation and NuGet source configuration, retry installing SqlPackage using the appropriate command:
dotnet tool install -g microsoft.sqlpackage
Preview releases of SqlPackage are available with the dotnet tool feed. To access preview releases, use the --prerelease
option with the dotnet tool
command. For example, to install the latest preview release, run the following command:
dotnet tool install -g --prerelease microsoft.sqlpackage
To update SqlPackage to the latest preview version, run the following command:
dotnet tool update -g --prerelease microsoft.sqlpackage
A list of preview releases is available on the dotnet tool feed for SqlPackage.
Installation, file download (alternative)SqlPackage is also prepared as a self-contained download for Windows, macOS, and Linux. No .NET install is required, however, the operating system requirements are the same as the dotnet tool install. The dependencies included in this .zip download are updated more frequently in the dotnet tool option for SqlPackage. The following links are for the latest version of SqlPackage:
LinuxDownload SqlPackage for Linux
Extract the file and launch SqlPackage. Open a new Terminal window and type the following commands:
cd ~
mkdir sqlpackage
unzip ~/Downloads/sqlpackage-linux-<version string>.zip -d ~/sqlpackage
echo "export PATH=\"\$PATH:$HOME/sqlpackage\"" >> ~/.bashrc
chmod a+x ~/sqlpackage/sqlpackage
source ~/.bashrc
sqlpackage
Note
You might have missing dependencies. Use the following commands to install these dependencies depending on your version of Linux:
Debian:
sudo apt-get install libunwind8
Red Hat:
yum install libunwind
yum install libicu
Ubuntu:
sudo apt-get install libunwind8
Download SqlPackage for macOS
Extract the file and launch SqlPackage. Open a new Terminal window and type the following commands:
mkdir sqlpackage
unzip ~/Downloads/sqlpackage-osx-<version string>.zip -d ~/sqlpackage
chmod +x ~/sqlpackage/sqlpackage
echo 'export PATH="$PATH:~/sqlpackage"' >> ~/.bash_profile
source ~/.bash_profile
sqlpackage
Note
Security settings might require modification to run SqlPackage on macOS. Use the following commands to interact with Gatekeeper from the command line.
Before executing SqlPackage:
sudo spctl --master-disable
After executing SqlPackage:
sudo spctl --master-enable
Download SqlPackage for Windows
Extract the file by right-clicking on the file in Windows Explorer, and selecting 'Extract All...', and select the target directory
Open a new Terminal window and cd to the location where SqlPackage was extracted:
> sqlpackage
This release of SqlPackage includes a standard Windows installer experience, and a .zip:
C:\Program Files\Microsoft SQL Server\170\DAC\bin
folderIf you installed SqlPackage using the Windows installer, then uninstall the same way you remove any Windows application.
If you installed SqlPackage with a .zip or other archive, then delete the files.
Automated environmentsEvergreen links are available for downloading the latest Sqlpackage versions:
SqlPackage is a command-line interface for the DacFx framework, exposing some of the public DacFx APIs. DacServices (Microsoft.SqlServer.Dac) is a related mechanism for integrating database deployment into your application pipeline. The DacServices API is available in a package through NuGet, Microsoft.SqlServer.DacFx.
Adding the NuGet package to a .NET project is accomplished via the .NET CLI with this command:
dotnet add package Microsoft.SqlServer.DacFx
Note
Other NuGet packages were published under the DacFx name, Microsoft.SqlServer.DacFx.x64
and Microsoft.SqlServer.DacFx.x86
. Support for both platforms is covered under the Microsoft.SqlServer.DacFx
package. New references should be made to this package, not the x64 or x86 variants.
SqlPackage runs on Windows, macOS, and Linux and is built using .NET 8. The .NET 8 OS requirements are minimum requirements for SqlPackage, which has extra requirements due to its dependencies.
Windows (x64)This release of SqlPackage can be installed in the following languages:
SqlPackage .NET 8 Windows:
Chinese (Simplified) | Chinese (Traditional) | English (United States) | French | German | Italian | Japanese | Korean | Portuguese (Brazil) | Russian | Spanish
SqlPackage .NET Framework Windows:
Chinese (Simplified) | Chinese (Traditional) | English (United States) | French | German | Italian | Japanese | Korean | Portuguese (Brazil) | Russian | Spanish
SqlPackage .NET 8 macOS:
Chinese (Simplified) | Chinese (Traditional) | English (United States) | French | German | Italian | Japanese | Korean | Portuguese (Brazil) | Russian | Spanish
SqlPackage .NET 8 Linux:
Chinese (Simplified) | Chinese (Traditional) | English (United States) | French | German | Italian | Japanese | Korean | Portuguese (Brazil) | Russian | Spanish
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4