sqlpackage exception: Unrecognized command line argument BlockOnPossibleDataLoss

arielman2304 676 Reputation points
2021-06-06T14:12:01.557+00:00

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

SQL Server | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. AmeliaGu-MSFT 14,011 Reputation points Microsoft External Staff
    2021-06-07T06:05:13.177+00:00

    Hi arielman2304-0180,
    After some test, it seems your command runs without issue.
    102838-image.png

    Could you please try to run the CMD as administrator?

    Best Regards,
    Amelia


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.