Solved

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

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 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