Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'sqlpackage.exe' is not recognized as an internal or external command Error

I used maven,Microsoft SQL server management studio 17.SQL server verion is 14.0.1000.169. When i build my project it gives following error and build failed

'sqlpackage.exe' is not recognized as an internal or external command,
operable program or batch file.
[ERROR] The following errors occured during execution:
[ERROR] 'sqlpackage.exe' is not recognized as an internal or external command,
[ERROR] operable program or batch file.

This is my system environment path variables. enter image description here

I can't find what's the wrong

like image 690
Jayani Sumudini Avatar asked May 23 '18 04:05

Jayani Sumudini


People also ask

Where can I find SqlPackage EXE?

In my case, the executable file for the SQLPackage is usually located at “C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin“. Once the path has been added click on OK. Now that the path of the executable has been added to the system variables, we can directly call the SQLPackage from the command-line.

What is SQL package exe?

SqlPackage.exe is a command-line utility that automates the following database development tasks by exposing some of the public Data-Tier Application Framework (DacFx) APIs: Version: Returns the build number of the SqlPackage application. Added in version 18.6.

Where is SQL package installed?

SQL Server Management Studio (SSMS) and the Dac Framework MSI: C:\Program Files (x86)\Microsoft SQL Server\{SqlVersion}\Dac\bin.


3 Answers

I didn't have the location of sqlpackage.exe in the PATH variable. After adding it to PATH variable, had resolved the issue for me. (Something like below)

C:\Program Files\Microsoft SQL Server\140\DAC\bin
like image 101
Jude Niroshan Avatar answered Oct 03 '22 12:10

Jude Niroshan


It's fixed using following steps.

You need to Install Sql server data tools For that follow this steps.

For windows,

  • Install chocolatey
  • Install SSDT components
  • Add sqlpackage.exe to classpath

For Install chocolatey

  • https://chocolatey.org/install

For Install SSDT components

  • choco install sqlserver-cmdlineutils

  • choco install sql2014.clrtypes

  • choco install sql2014-sqldom

  • choco install sql2014-dacframework

For Add sqlpackage.exe to classpath

  • RUN setx PATH "%PATH%;C:\Program Files\Microsoft SQL Server\120\DAC\bin\;"
like image 44
Jayani Sumudini Avatar answered Oct 03 '22 11:10

Jayani Sumudini


Looks like you havn't installed Data-tier Application Framework. You can download and install DacFx (17.4.1) from https://www.microsoft.com/en-us/download/details.aspx?id=56508

like image 26
Dmitry Kolchev Avatar answered Oct 03 '22 11:10

Dmitry Kolchev