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.
I can't find what's the wrong
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.
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.
SQL Server Management Studio (SSMS) and the Dac Framework MSI: C:\Program Files (x86)\Microsoft SQL Server\{SqlVersion}\Dac\bin.
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
It's fixed using following steps.
You need to Install Sql server data tools For that follow this steps.
For windows,
For Install chocolatey
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With