DacFx icon indicating copy to clipboard operation
DacFx copied to clipboard

Deploy with db_owner and DropObjectsNotInSource option user drops the user in target

Open llali opened this issue 2 years ago • 0 comments

  • SqlPackage or DacFx Version:
  • .NET Framework (Windows-only) or .NET Core:
  • Environment (local platform and source/target platforms):

Steps to Reproduce:

  1. Create a db with a table t1 and with a db_owner user on a login
  2. Create another database with only a table (t2) and extract to a dacpac
  3. using sqlpcakge publish the dacpac from step 2 to the database in step 1. use the new user in the db in sqlpackage.exe publish command. set option DropObjectsNotInSource to true

Expected: Database 1 should have table t1 dropped and t2 created Actual: the user in database 1 is dropped to it cannot continue with the publish

Did this occur in prior versions? If not - which version(s) did it work in?

(DacFx/SqlPackage/SSMS/Azure Data Studio)

llali avatar Sep 18 '23 17:09 llali