September 22, 2010 at 1:09 pm
Hello,
I am pretty new to SQL, please dont be too hard on me :w00t:
I am frequently taking a backup of production database (on a production Domain) and restore them on a DEV sql server (on a DEV domain).
Every time i need to get user, right and roles of each user to restore it correctly.
There must be a way to extract all current user,right,roles from a specific database, backup a bd from a domain, restore it to a new server, delete all user that follow the backup and restore the user,right,role to the newly restored BD???
I am not really a DBA, but I am taking slowly the management of the SQL's
Thank you very much for your help.
September 22, 2010 at 11:36 pm
For one time you can use sp_helprevlogin to sync all logins on the source to destination. After restoring the database on the destination instance, sp_change_users_login can be used to fix orphaned users if any.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
September 23, 2010 at 2:01 am
patrick.blais (9/22/2010)
I am frequently taking a backup of production database (on a production Domain) and restore them on a DEV sql server (on a DEV domain).
you can also go for a kind of automation where you can use a script which will handle restore and orphan user fix. For script : Google it 🙂
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply