Tuesday, June 02, 2009

sp_change_users_login

When database is restored from other back file but login user can't be assigned to the restored database, run following:


USE tablename
GO
EXEC sp_change_users_login 'Update_One', 'username', 'username';

Relative link:
http://msdn.microsoft.com/en-us/library/ms174378.aspx

Blog Archive