SQL Compare tries to create a not vc'ed user as a schema.
andreas_agren
Posts: 14
I have encountered a relly weird problem with a user that SQL Compare tries to script as a schema.
Here's how to reproduce the issue:
There will now be the following statement in the comparison window:
This user can also be seen as unmapped in the owner mapping window.
The only way to get rid of the create-schema-statement, afaik, is to also commit the actual user and then redo the comparison.
Am i missing something here or is this a bug?
Here's how to reproduce the issue:
- Link a db to svn using red gate source control.
- Create a new user (e.g. test_user) and add it to the db_owner role for the vc'ed db.
- Commit the role change for db_owner but leave the user.
- Right-click the db and choose schema compare/deploy and set the db as both source and target. (I know it doesn't make sense to deploy to the same db but bear with me, it's just for the sake of reproducing the problem.)
- Change source to source to source control and pick the revision where you just commited a role change.
- Launch sql compare and click ok to do the comparison.
There will now be the following statement in the comparison window:
-- Schema CREATE SCHEMA [test_user] AUTHORIZATION [test_user] GO
This user can also be seen as unmapped in the owner mapping window.
The only way to get rid of the create-schema-statement, afaik, is to also commit the actual user and then redo the comparison.
Am i missing something here or is this a bug?
Comments
I'm not quite sure how you got it to display the result you saw, unless it's a function of the comparison options you selected.
Either way, we don't generally recommend you perform a "partial commit" like this, as it can lead to the Get Latest process not working for other users (think of the scenario where you create a new procedure and table, then commit just the procedure. When another user tries to do a "get" it'll fail as the dependent table doesn't exist).
Redgate Software