• sure; there's a system view named sys.database_permissions.

    this will give you users and groups that have the permission you are looking for...but you might need to expand group members if you want individuals who inherit from the group.

    also, anyone in the sysadmin role inherently has that permission as well, but it's implied, and not explicit.

    select usrz.*

    from sys.database_permissions permz

    inner join sys.database_principals usrz

    ON permz.grantee_principal_id = usrz.principal_id

    WHERE permission_name='VIEW DEFINITION'

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!