Solved

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

Posted on 2012-03-30
3
415 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Job - date manual 1 43
GeoClustering  and AOG 25 43
How can I get the entire database script? 7 25
Stored Procedure needs owner to execute 5 45
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 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