Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvillegascuellar/0d675060f00ffdcc3a5703b9bd0b3821 to your computer and use it in GitHub Desktop.
Save mvillegascuellar/0d675060f00ffdcc3a5703b9bd0b3821 to your computer and use it in GitHub Desktop.
select sp.permission_name, sp.class_desc, ep.name as [endpoint]
from sys.server_permissions sp
left join sys.database_mirroring_endpoints ep
on sp.major_id = ep.endpoint_id
where suser_name(SP.grantee_principal_id) = 'YOURDOMAIN\SQLServiceUser'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment