Red Gate forums :: View topic - Can't synchronize mapping between users and logins
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

Can't synchronize mapping between users and logins

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
isme



Joined: 12 Jun 2012
Posts: 75
Location: Edinburgh

PostPosted: Fri Oct 18, 2013 5:27 pm    Post subject: Can't synchronize mapping between users and logins Reply with quote

SQL Compare can't synchronize the mapping between users and logins.

If the user is defined as WITHOUT LOGIN in the database and FOR LOGIN in the repository, SQL Compare can detect the change, but it can't synchronize it.

In my database I have a skytester user without a login. In the repository, the user definition maps the user to a login with the same name.

SQL Server Management Studio scripts out the user object like this:

Code:

USE [KeyConfig_API]
GO

/****** Object:  User [skytester]    Script Date: 18/10/2013 16:09:16 ******/
CREATE USER [skytester] WITHOUT LOGIN WITH DEFAULT_SCHEMA=[dbo]
GO


The definition file skytester.sql currently looks like this:

Code:

IF NOT EXISTS (SELECT * FROM master.dbo.syslogins WHERE loginname = N'skytester')
CREATE LOGIN [skytester] WITH PASSWORD = 'p@ssw0rd'
GO
CREATE USER [skytester] FOR LOGIN [skytester]
GO


SQL Compare detects and displays the difference:



When I try to deploy the change, the deployment wizard warns me that my database might be corrupt:



This warning always appears for users without logins. It's safe to ignore.

When I try to commit the changes using TortoiseSVN, there are no changes to commit:



SQL Compare acts like it updates the scripts folder, but nothing really changes.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6582

PostPosted: Mon Oct 21, 2013 2:53 pm    Post subject: Reply with quote

Thanks for pointing this out. I have logged this as SC-6018, so the development team should be looking at it.
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