Howto find Statement permissions

  • How can I get list of statement permissions granted to all users using TSQL. I know I can get it using Enterprise manager for ever user separately, but I am lookig for a script since I have to run it on all my SQL Servers.

    Thank you.

  • How about this recently posted script?

    http://www.sqlservercentral.com/scripts/contributions/1158.asp

    If not, what else do you need?



    Everett Wilson
    ewilson10@yahoo.com

  • Permissions are stored in the sysprotects system table in each database. The Action column defines what type of permission (SELECT/UPDATE/CREATE TABLE/etc) is being set. Read SQL BOL for more details about the columns, but basically you should be able to select from that table with a CASE statement to see what permissions are set.

    CREATE TABLE, CREATE VIEW, and other database wide permissions (but not permissions on the database itself) are also in the sysprotects table, but with a ID of 0


    Julian Kuiters
    juliankuiters.id.au

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

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