Tuesday, March 20, 2012

Script out users and roles(2005)

Hi,
Can someone please tell me how to script out database users and roles in SQL
Server 2005?
I am not able to locate this option as it was there in SQL Server
2000--right click database-->generate sql scripts-->options tab second
option..
Thanks
Manumanu wrote:
> Can someone please tell me how to script out database users and roles
> in SQL Server 2005?
> I am not able to locate this option as it was there in SQL Server
> 2000--right click database-->generate sql scripts-->options tab
> second option..
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
However, it seems that in SQL 2005 the generated script does not
include (at least) the membership of users in standard database roles.
--
Razvan Socol
SQL Server MVP

No comments:

Post a Comment