Solved

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

Posted on 2012-03-30
3
411 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

760 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

16 Experts available now in Live!

Get 1:1 Help Now