microsoft / microsoft/DacFx

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

Open
#339 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
460
Forks
29
Avg merge
4d 9h
Merged PRs (30d)
7

Description

- 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)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with SqlPackage publish, a dacpac containing table t2, DropObjectsNotInSource enabled, and the db_owner user described in the steps. Compare the publish behavior with the expected handling of the existing user and tables; done means the publish completes without dropping the user unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.