Solved

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

Posted on 2012-03-30
3
412 Views
Last Modified: 2012-06-22
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.
0
Comment
Question by:Bharat Guru
3 Comments
 
LVL 35

Expert Comment

by:David Todd
ID: 37790065
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
 
LVL 16

Accepted Solution

by:
vdr1620 earned 120 total points
ID: 37791492
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
 

Author Closing Comment

by:Bharat Guru
ID: 37906105
Thanks
0

Featured Post

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now