How to check who has access to symmetric keys in SQL Server

user3229801 picture user3229801 · Jun 13, 2014 · Viewed 8.2k times · Source

I would like to know all the users that have access to symmetric keys and the type of access they have. Can you please let me know how I can do this?

Answer

Dusan picture Dusan · Jun 13, 2014

Maybe this query can help:

select u.name, p.permission_name, p.class_desc, 
    object_name(p.major_id) ObjectName, state_desc 
from sys.database_permissions  p join sys.database_principals u
on p.grantee_principal_id = u.principal_id
where class_desc = 'SYMMETRIC_KEYS'