How to find database,object,schema level permissions on a server

  • Hi...any one can provide the solution please it's very urgent

    i need a tsql script for SQL SERVER 2005

    Requirements:

    I have 2 user accounts for the both accounts i need to find the all the permissions.

    Like...

    •The 2 users are mapped to which databases on the server?

    •What are the databases names?

    •What kind of permissions having on the mapped databases?

    •For each database i need to find all the permissions like object level, schema level....etc.....?

    Thanks

  • ¥?ürz.§µññÿ (3/12/2013)


    Hi...any one can provide the solution please it's very urgent

    i need a tsql script for SQL SERVER 2005

    Requirements:

    I have 2 user accounts for the both accounts i need to find the all the permissions.

    Like...

    •The 2 users are mapped to which databases on the server?

    •What are the databases names?

    •What kind of permissions having on the mapped databases?

    •For each database i need to find all the permissions like object level, schema level....etc.....?

    Thanks

    I think you may need to word your question differently without it looking like your trying to offload your work on folks?

    At the very least, you should come back with something you have tried.

    In any case, I can point you to the Security Catalog Views in Books Online and frankly, a little googling will

    probably give you some good starting point scripts.

  • Hi...friends.........This script gives all the permissions

    Try this......very useful

    select USER_NAME(p.grantee_principal_id) AS principal_name,

    dp.type_desc AS principal_type_desc,

    p.class_desc,

    OBJECT_NAME(p.major_id) AS object_name,

    p.permission_name,

    p.state_desc AS permission_state_desc

    from sys.database_permissions p

    inner JOIN sys.database_principals dp

    on p.grantee_principal_id = dp.principal_id

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

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