Friday, June 30, 2006

 

Fixing up users and logins after restoring a SQL Server 2000 SS2K database data base

A slight flaw in SQL Server 2000 data base restore is in the handling of logins and users in the restored data base. If you backup a data base and restore it on a different machine or to a different name, the users and persmissions are not quite what you could hope for. So what's a poor schmuck to do?

sp_change_users_login @Action = 'Update_one', @UserNamePattern = 'user Id here', @LoginName = 'User ID here'

or something similar.

SS2k5 seems to have corrected this little flaw.

This scenario comes up in developer environments when data bases are copied frequently.

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?