Search code examples
sql-serverlinuxdacpacsqlpackagesql-server-2017

SQLPackage not found in SQL Server on Linux


I am trying to do dacpac deployment using SQLPackage on Linux.

My environment:

Server : Ubuntu Linux version 16.04

SQL Server 2017 latest release candidate version RC1.

SQL Server installation is successful and I am able to create tables on SQL Server database on Ubuntu. Now I am trying to implement dacpac deployment on Linux. As per this documentation

https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-export-import-with-sqlpackage

SQLPackage executable has to be at /opt/mssql/bin. But it is not. Any idea how to install SQLPackage on linux?

When I check the older version which is CTP 2.1 I have that SqlPackage executable. Is that missed in RC 1?


Solution

  • -Regarding temporary removal of sqlpackage from SQL Server 2017 package-

    The goal is to offer customers the best CLI experience on Linux, macOS and Windows with a multi-os version of sqlpackage that uses DACFx APIs based on .NET Core.

    As a stop-gap towards this goal, we offered an early preview version of the Windows-based sqlpackage in SQL2017 CTPs on Linux to seek customer feedback. We have removed this preview version of sqlpackage from SQL2017 RC1.

    Work on the multi-os version of sqlpackage is in progress but I cannot share a release date at this time. Until then, you can use one or more of the alternatives below to import a dataset on each new run of your image:

    1) restore an existing .bak file into the new image using the sqlcmd CLI tool.https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools

    2) run sqlpackage on a Windows machine to work with SQL 2017 running in the new image.

    3) generate a script with CREATE + INSERT statements for your database or specific tables. You can use SSMS’s Generate Script wizard on Windows or the new Python-based mssql-scripter CLI (public preview) to generate the script and check it into source control if you wish. Then, you can use the sqlcmd CLI tool to execute the script in your new image. For mssql-scripter installation instruction, please see README.md inhttps://github.com/Microsoft/sql-xplat-cli

    Please send me an email at [email protected] if you have more questions or feedback and we'll be happy to help.