List all permission in all databases

  • Dr.JeanPaul

    Newbie

    Points: 7

    Hi Folks!

    Nice script! The only problem I see it's when the user (o role) have permission on a schema instead of a table. In that case the script will show that the user have permission on a system table (like sysrowsets) because the mayor_id value is 5, and that correspond to the sys.schemas view (schema_id) and not the sys.sysobjects (object_id).

    Regards.

    JP.

  • akljfhnlaflkj

    SSC Guru

    Points: 76202

    Thanks for the script.

  • webrunner

    SSC-Dedicated

    Points: 30407

    Thanks for this great script!!
    FYI, I have a couple of offline databases on a non-production server and got an error that stopped the script when I ran it.
    I was able to work around it by modifying the sys.databases query to this:
    select name from sys.databases where state_desc = 'ONLINE' order by name

    Thanks again!

    - webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

Viewing 3 posts - 16 through 18 (of 18 total)

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