If you ever migrate a SQL Server database from one server to another, you'll find that the database IDs get messed up when you reattach the database.
Use the SQL below to migrate the database's legacy ids to the new server's ids:
USE dbname
go
EXEC sp_change_users_login 'Update_One', 'oldid', 'newid'
Welcome!
Braintapper is an open community for business intelligence professionals.
Ask and answer questions, post interesting social bookmarks, and job postings for free!
All you need to join is an OpenID, e-mail address and a nickname!