jfordhill
asked on
Who has CONTROL SERVER in SQL 2005?
How do I find out who has been granted the CONTROL SERVER priviledge in SQL Server 2005?
sorry misread that as just CONTROL
ASKER
sys.database_permissions appears to just be database level permissions. I also checked sys.server_permissions, but I didn't see "CONTROL SERVER".
ASKER
But I see from the following microsoft page that the "CONTROL SERVER" permission would be shown in the sys.server_permissions table:
http://msdn2.microsoft.com/en-us/library/ms186260.aspx
http://msdn2.microsoft.com/en-us/library/ms186260.aspx
ASKER
Here's how I got my answer:
select b.name, a.permission_name from sys.server_permissions a, sys.server_principals b
where a.grantee_principal_id = b.principal_id
and permission_name = 'CONTROL SERVER'
select b.name, a.permission_name from sys.server_permissions a, sys.server_principals b
where a.grantee_principal_id = b.principal_id
and permission_name = 'CONTROL SERVER'
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
but presumably you'd also need to know if the id had dbo/sysadmin ... rights as well..