Thursday, March 22, 2012

create a list if user

Hi there,

Can someone please help me how to generate the list of all "user" in a database and it's access role? really need it . .

Thanks

I am guessing you are looking for the information that is accessible from the following catalog views:

· Sys.database_principals http://msdn2.microsoft.com/en-us/library/ms187328.aspx

· Sys.database_role_members http://msdn2.microsoft.com/en-us/library/ms189780.aspx

· Sys.database_permissions http://msdn2.microsoft.com/en-us/library/ms188367.aspx

I would also like to recommend the following links from BOL:

· Principals http://msdn2.microsoft.com/en-us/library/ms181127.aspx

· Permissions hierarchy http://msdn2.microsoft.com/en-us/library/ms191465.aspx

· Database-level roles http://msdn2.microsoft.com/en-us/library/ms189121.aspx

Hopefully these links will help you find the answer you are looking for.

Please let us know if you have further questions.

Thanks,

-Raul Garcia

SDE/T

SQL Server Engine

|||

Thanks for the quick reply, is there any possbile way I can make a select stament with an out like this (ex only)

User ServerRole DBRole Permission ?

Actully this is my first task in work . . we need this fof auditing purposes . . . Pls help

Raul Garcia - MS wrote:

I am guessing you are looking for the information that is accessible from the following catalog views:

· Sys.database_principals http://msdn2.microsoft.com/en-us/library/ms187328.aspx

· Sys.database_role_members http://msdn2.microsoft.com/en-us/library/ms189780.aspx

· Sys.database_permissions http://msdn2.microsoft.com/en-us/library/ms188367.aspx

I would also like to recommend the following links from BOL:

· Principals http://msdn2.microsoft.com/en-us/library/ms181127.aspx

· Permissions hierarchy http://msdn2.microsoft.com/en-us/library/ms191465.aspx

· Database-level roles http://msdn2.microsoft.com/en-us/library/ms189121.aspx

Hopefully these links will help you find the answer you are looking for.

Please let us know if you have further questions.

Thanks,

-Raul Garcia

SDE/T

SQL Server Engine

No comments:

Post a Comment