I am running SqlPackage in my CI build to deploy dacpacs and pass in a publish.xml file using the /Profile switch. I have the following three options set in the profile:
<DropObjectsNotInSource>True</DropObjectsNotInSource>
<DoNotDropPermissions>True</DoNotDropPermissions>
<DoNotDropUsers>True</DoNotDropUsers>
However when I run the dacpac deploy it still tries to drop my users. Any ideas?
There is (unfortunately) a bug in SqlPackage.exe's handling of publish profiles, whereby the DoNotDrop and Exclude options are not honored. This will be fixed in an upcoming version of SqlPackage.exe. In the meantime have you tried using this SqlPackage.exe command line argument?
/p:DoNotDropObjectTypes=Permissions;Users
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