How to check which permissions are granted to me

  • Hi,

    At my work place, they say, they have granted us db_ddladmin role and datawriter permissions.(Also we have granted security_admin role)

    How to confirm this that I've been granted those permissions.

    Note: My ID is in group "XXX_Group" and permissions are granted to that group

    Is there any script to find it out?

    Thanks,

    KB

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • You can use fn_my_permissions to check your permissions for a specific object in the database. http://msdn.microsoft.com/en-us/library/ms176097.aspx

    If you're after the current logins, roles, etc. that you are a member of this should work:

    SELECT

    dp.[name],

    type_desc

    FROM sys.database_principals AS dp

    WHERE is_member(dp.[name]) = 1

    UNION ALL

    SELECT

    sp.[name],

    type_desc

    FROM sys.server_principals AS sp

    WHERE is_srvrolemember(sp.[name]) = 1

    OR is_member(sp.[name]) = 1

    Edited, added script to display logins and roles for the current user.

  • You can also use the sp_helprotect stored proc to get the information about the objects you have granted or denied access to.

    sp_helprotect

    Something that I usually do is to put that into a temp table I created before, so I can apply filters to it.

    Frank.

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

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