Find Custom Database Role privileges

  • We have several custom database roles and I need a script that will tell me what privileges these roles have on tables and or SP's. I have searched all over the net and can find no such script for SP to use.

    Any help is appreciated.

    Thanks,

    Keith

  • If it is only for tables and SPs then you can use this:

    EXEC sys.sp_helprotect

    @username = 'role_name' ;

    If you need to whole picture you'll have to go further. From http://technet.microsoft.com/en-us/library/ms190310.aspx:

    Important

    sp_helprotect does not return information about securables that were introduced in SQL Server 2005. Use sys.database_permissions and fn_builtin_permissions instead.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

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

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