I hope this is a simple enough question to answer.
Every night we back up 2 large Production database files and then move them
over to our testing SQL environment (different) server, so that our
developers can play with one-day old production data. My boss wants me each
night to export out our list of users from the prod sql and then import this
into the test SQL. I understand enought to know that i will need a T-sql
script, but can I easily expect to dump all the users in one feel swoop, or
do I need to so this one user or one group at at time and then import them in
the same way? is there an easier way that I am missing? Thanks.
Hi,
The users will be automatically moved after the database restore. But if you
have
login syncronization issue then you could use the system procedure
sp_change_users_login
to sync the logins with users. Once you syncronize it is not required to
export and import the users.
See the below link to export and import the logins.
http://www.databasejournal.com/featu...le.php/2228611
Thanks
Hari
MCDBA
"Sam" wrote:
> I hope this is a simple enough question to answer.
> Every night we back up 2 large Production database files and then move them
> over to our testing SQL environment (different) server, so that our
> developers can play with one-day old production data. My boss wants me each
> night to export out our list of users from the prod sql and then import this
> into the test SQL. I understand enought to know that i will need a T-sql
> script, but can I easily expect to dump all the users in one feel swoop, or
> do I need to so this one user or one group at at time and then import them in
> the same way? is there an easier way that I am missing? Thanks.
No comments:
Post a Comment