title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | ms.custom | ||
---|---|---|---|---|---|---|---|---|---|---|---|
Download and install SqlPackage |
Download and Install SqlPackage for Windows, macOS, or Linux |
dzsquared |
drskwier |
maghan |
5/10/2023 |
sql |
tools-other |
conceptual |
|
SqlPackage runs on Windows, macOS, and Linux, and is available to install through dotnet tool
or as a standalone zip download.
- Version number: 162.1.167
- Build number: 162.1.167
- Release date: October 19, 2023
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 Core SDK v6.0 or later to be installed on your machine. Installing SqlPackage as a global tool will make it available on your path as sqlpackage
and is the recommended way to install SqlPackage for Windows, macOS, and Linux.
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
Platform | Download |
---|---|
Windows .NET 6 | .zip file |
Windows | MSI Installer |
macOS .NET 6 | .zip file |
Linux .NET 6 | .zip file |
-
Download SqlPackage for Linux.
-
To 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.
-
To 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.
-
To 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. The current DacFx version is 162.1.167.1.
Adding the NuGet package to a .NET project is accomplished via the .NET CLI with this command:
dotnet add package Microsoft.SqlServer.DacFx
Note
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 additional 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 6 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 6 macOS:
Chinese (Simplified) | Chinese (Traditional) | English (United States) | French | German | Italian | Japanese | Korean | Portuguese (Brazil) | Russian | Spanish
SqlPackage .NET 6 Linux:
Chinese (Simplified) | Chinese (Traditional) | English (United States) | French | German | Italian | Japanese | Korean | Portuguese (Brazil) | Russian | Spanish
- Learn more about SqlPackage