Download and install SqlPackage
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.
- Version number: 162.4.92
- Build number: 162.4.92.3
- Release date: September 18, 2024
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.
Opomba
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 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.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
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.
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 8 | .zip file |
Windows | .msi file |
macOS .NET 8 | .zip file |
Linux .NET 8 | .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
Opomba
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
Opomba
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\bin
folder
- 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.
Adding the NuGet package to a .NET project is accomplished via the .NET CLI with this command:
dotnet add package Microsoft.SqlServer.DacFx
Opomba
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 8. The .NET 8 OS requirements are minimum requirements for SqlPackage, which has extra requirements due to its dependencies.
- Windows 11
- Windows 10 (1607+)
- Windows Server Core 2012 R2+
- Windows Server 2012 R2+
- macOS 12 "Monterey"+
- Debian 11+
- Red Hat Enterprise Linux 8+
- SUSE Linux Enterprise Server v12 SP2+
- Ubuntu 20.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