Search code examples
cmdsqlpackage

sqlpackage exception: Unrecognized command line argument BlockOnPossibleDataLoss


I'm running the below command in my CMD:

sqlpackage /action:Publish /SourceFile:"Database Services\bin\Release\Database Services.dacpac" /TargetConnectionString:"Data Source=TEST05,123;Integrated Security=True;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=False;Initial catalog=test" /p:BlockOnPossibleDataLoss=False

but getting this exception:

*** Unrecognized command line argument 'p:BlockOnPossibleDataLoss=False'.

What is wrong with the syntax? I followed the official documentation


Solution

  • Very simple solution :) I had to run the CMD as administrator