Red Gate forums :: View topic - Scripting users
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Toolkit Previous Versions
SQL Toolkit Previous Versions forum

Scripting users

Search in SQL Toolkit Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
TheBatA



Joined: 25 Sep 2007
Posts: 12
Location: Belgrade

PostPosted: Thu Jan 10, 2008 2:44 pm    Post subject: Scripting users Reply with quote

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:
Code:
  User, group, or role 'dbo' already exists in the current database.

GetString() method from ExecutionBlock object contains next lines:
Code:
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!
Back to top
View user's profile Send private message
Michelle Taylor



Joined: 30 Oct 2006
Posts: 529
Location: Red Gate Software

PostPosted: Thu Jan 10, 2008 3:22 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group