StephanieR


In 2005, is there a way to automate this I'd like to be able to do this automatically periodically:

1) Script out the development users and their roles in my development database

2) Backup the production database and restore the it to the development database

3) Re-synch the existing users (sp_change_users_login), drop any obsolete users (sp_dropuser), and add any development users with roles back on

Does anyone have a script that can help me achieve this




Re: Users and Roles script

Satya SKJ


Refer to this http://weblogs.sqlteam.com/billg/archive/2005/11/22/8414.aspx for more information, as you can use SMO in SQL 2005.