Options

Scripting users

TheBatATheBatA Posts: 18
edited January 10, 2008 9:22AM in SQL Toolkit Previous Versions
I am trying to compare 2 databases, db1 is loaded from a snapshot and db2 is database on local server.
I compared two databases, handled differences (I've selected only different tables, other database objects are deselected) and built work object from differences.
When I try to execute schema block, I get this message:
User, group, or role 'dbo' already exists in the current database.
GetString() method from ExecutionBlock object contains next lines:
CREATE USER [dbo] WITHOUT LOGIN WITH DEFAULT_SCHEMA=[dbo]
GO
REVOKE CONNECT FROM [dbo]
GO

I tried to use IgnoreUsers and IgnorePermissions options, but dbo user is still being scripted.
This user exists in both databases.
How can I exclude creation of user [dbo]?

Thanks!

Comments

  • Options
    I'm somewhat confused as to how you've managed to get it attempting to synchronize 'dbo' - I've only come across this previously with different capitalizations of 'dbo' in scripts.

    Can you post the code that you're using, or send it to michelle.taylor@red-gate.com so I can have a look at it? I might also need to have a look at the databases themselves to work out why it's trying to synchronize dbo.
    Software Developer
    Redgate Software
Sign In or Register to comment.