Forums.ATC.no
Teknisk => Generelt teknisk => Emne startet av: ATC på 29. Mai 2009, 07:44 am
-
When migrating a database from one SQL Server to another, the database itself will contain database-users with no corresponding login-user.
Attempting to "map" a new login-user to one of those existing (orphaned) database-users will FAIL because "the database-user already exists" (sic)
-
See http://www.mssqltips.com/tip.asp?tip=1590 for detailed information. The short version:
USE DatabaseName
GO
sp_change_users_login @Action='update_one',
@UserNamePattern='DatabaseUser1',
@LoginName='LoginUser1'
GO
Using attach/detach for migration is pretty useless without this, so why did they not implement this in the management GUI??