Users with permission to GRANT CONNECT to other

  • I would like to find out which users have the permission to GRANT CONNECT to the server and the database to other users.

    Blog
    http://saveadba.blogspot.com/

  • --This should do the trick if I understand what you're asking for:

    SELECT PRIN.[name]

    FROM sys.[server_permissions] PER

    INNER JOIN sys.[server_principals] PRIN

    ON PER.[grantee_principal_id] = PRIN.[principal_id]

    WHERE PER.[permission_name] = 'CONNECT SQL'

    AND (PER.[state] = 'G' OR PER.[state] = 'W')

    ORDER BY PRIN.[name]

    - Tim Ford, SQL Server MVPhttp://www.sqlcruise.comhttp://www.thesqlagentman.com http://www.linkedin.com/in/timothyford

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

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