SQL 2008 How to generate the script for all database users and there roles

I want copy the database into new server, I have created BACKUP from my primary server and restored into new server but now how can i generated the script for all uers and there roll so I can deployed it to new server.
Bharat GuruAsked:
Who is Participating?
 
vdr1620Connect With a Mentor Commented:
check this KB article  - http://support.microsoft.com/kb/246133

or try this

In SQL Server Management Studio 2005, you can generate scripts for
database users and roles this way:

1. right click on the database / Tasks / Generate scripts
2. click Next, select the database, uncheck "script all objects" and
click Next twice
3. in the "Choose Objects Types" step, check "Database roles" and
"Users"
4. choose the remaining options in the Wizard to finish
0
 
David ToddSenior DBACommented:
Hi,

Search for sp_help_rev_login and download the script from Microsoft.

It wont do roles, but it will create create login scripts that you can take to another instance of SQL 2008.

HTH
  David
0
 
Bharat GuruAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.