6

I'm trying to use sqlpackage tool for publish thought CMD:

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

and I'm getting this exception:

** The TargetConnectionString argument cannot be used in conjunction with any other Target database arguments.

I don't understand what does it means, I was able to deploy it earlier using msbuild:

msbuild "Database Services\Database Services.sqlproj" /t:deploy /p:Configuration=Release /p:TargetConnectionString="Data Source=TEST05,123;Integrated Security=True;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=False" /p:BlockOnPossibleDataLoss=False /p:TargetDatabase="test"

I've found one thread which might be relevant:

https://stackoverflow.com/a/52924779/11705021

0

1 Answer 1

6

Following this article, I was able to publish using this syntax:

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"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.