List all users on SQL instance and their privilages

  • Is there a way to get info on all the users and their associated privileges ?

    thanks in advance

  • Something like this executed against that DB:

    select * from sys.database_permissions d inner join sys.database_principals p

    on grantee_principal_id = principal_id

    inner join sys.objects o on major_id = object_id

    order by p.name, o.name

  • Have a read about sys.sysprotects and sp_helprotect for permissions GRANTed to users on objects. As for server level permissions (if you require that), I'm not sure, but you'll be able to find out if you do enough searching.

    John

  • If you look in the scripts section (here at SSC) there are several scripts that will help you get the full permission set for all users.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply