| title | Download and install SqlPackage | ||
|---|---|---|---|
| description | Download and Install SqlPackage for Windows, macOS, or Linux | ||
| author | dzsquared | ||
| ms.author | drskwier | ||
| ms.reviewer | maghan | ||
| ms.date | 2/27/2024 | ||
| ms.service | sql | ||
| ms.subservice | tools-other | ||
| ms.topic | conceptual | ||
| ms.custom |
|
SqlPackage runs on Windows, macOS, and Linux, and is available to install through dotnet tool or as a standalone zip download.
- Version number: 162.2.111
- Build number: 162.2.111.2
- Release date: February 27, 2024
For details about the latest release, see the release notes.
Note
SqlPackage version numbering has been adjusted to better reflect the DacFx build number it is associated with. Previously, SqlPackage had a distinct version number (19) and build number (160.x). Beginning with version 161, the version number of SqlPackage will match the DacFx version number it is associated with (eg 162.0.52).
Installing 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 6 and .NET 8.
To install SqlPackage as a global .NET tool, run the following command:
dotnet tool install -g microsoft.sqlpackageMore 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.sqlpackageTo uninstall SqlPackage, run the following command:
dotnet tool uninstall -g microsoft.sqlpackagePreview 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.sqlpackageTo update SqlPackage to the latest preview version, run the following command:
dotnet tool update -g --prerelease microsoft.sqlpackageA list of preview releases is available on the dotnet tool feed for SqlPackage.
SqlPackage is also prepared as a self-contained download for Windows, macOS, and Linux. No .NET install is required, however, 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:
| Platform | Download |
|---|---|
| Windows .NET 6 | .zip file |
| Windows | .msi file |
| macOS .NET 6 | .zip file |
| Linux .NET 6 | .zip file |
-
Download 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 may 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 may 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:
- Download and run the DacFramework.msi installer for Windows
- Open a new Command Prompt window, and run SqlPackage
- SqlPackage is installed to the
C:\Program Files\Microsoft SQL Server\160\DAC\binfolder
- SqlPackage is installed to the
If 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.
Evergreen links are available for downloading the latest Sqlpackage versions:
- Linux (https://aka.ms/sqlpackage-linux)
- macOS (https://aka.ms/sqlpackage-macos)
- Windows (https://aka.ms/sqlpackage-windows)
- Windows, .NET Framework (https://aka.ms/dacfx-msi)
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. The current DacFx version is 162.1.172.1.
Adding the NuGet package to a .NET project is accomplished via the .NET CLI with this command:
dotnet add package Microsoft.SqlServer.DacFxNote
Additional 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 6. The .NET 6 OS requirements are minimum requirements for SqlPackage, which has extra requirements due to its dependencies.
- Windows 11
- Windows 10 (1607+)
- Windows 8.1
- Windows 7 SP1
- Windows Server Core
- Windows Server 2012 R2
- Windows Server 2016
- Windows Server 2019
- Windows Server 2022
- macOS 14 "Sonoma"
- macOS 13 "Ventura"
- macOS 12 "Monterey"
- macOS 11 "Big Sur"
- Debian 10, 11
- Red Hat Enterprise Linux 7+
- SUSE Linux Enterprise Server v12 SP2+
- Ubuntu 16.04, 18.04, 20.04, 22.04
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
- Learn more about SqlPackage
- Learn more about SqlPackage in CI/CD pipelines
- Learn more about troubleshooting issues with SqlPackage
- Share feedback on SqlPackage in the DacFx GitHub repository