0

i am trying to run command

SqlPackage.exe /Action:Publish /SourceFile:"MyProject.BI.Database.MyDb.dacpac" /Profile:"Local.MyProject.BI.Database.MyDb.publish.xml" 1> Local.MyProject.BI.Database.MyDb.log 2>&1 

But i get error

SqlPackage is not recognized command

I downloaded sqlpackage.exe and installed.

I also added it in environment variable but still i get error

I have Sql server 2019

How to fix this?

DevelopmentIsMyPassion
  • 3,541
  • 4
  • 34
  • 60
  • Where are you running this command? What if you use the fully qualified path? I'm guessing for whatever reason it's not finding it in the path – Nick.Mc Feb 01 '21 at 10:49
  • @Nick.McDermaid i am running using command prompt – DevelopmentIsMyPassion Feb 01 '21 at 11:05
  • Just because you "install" a program does not mean you can run it from the command line without using complete path. The error is telling you the problem - the program is not in your path so it cannot be found. Use the complete path to the application. – SMor Feb 01 '21 at 11:20
  • If you run it fully qualified, i.e. `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\150\sqlpackage.exe` does it work? – Nick.Mc Feb 01 '21 at 11:46
  • and if you type `PATH` into the command line can you see the path you expect? – Nick.Mc Feb 01 '21 at 11:46
  • @Nick.McDermaid yes it works when i run from programfiles folder – DevelopmentIsMyPassion Feb 01 '21 at 11:54
  • So it's simply an issue with PATH. So you need to troubleshoot the _I also added it in environment variable_ bit - clearly that is not functioning. Do you see the expected path when you type `PATH` in the command line? – Nick.Mc Feb 01 '21 at 12:03

0 Answers0