Haven't been able to find the answer to this after sever searches. So decided to open the thread myself.
I am trying to write a report enumerating logins in SQL Server and all database-level and object-level permissions granted to each login.
Can someone tell me what system objects I can query to fetch this information?
TIA.
Hi,
You can get the results by querying the following system views(cata log views):
Database-Level Views:
sys.database_permissions
sys.database_principals
Server-Level Views:
sys.server_permissions
sys.sql_logins
sys.server_principals
Thanks & Regards,
Kiran.Y
|||That's just what I was looking for. Thanks much.
sql
No comments:
Post a Comment