I have the following query to get me a list of sysadmins in the current server:
select 'ServerRole' = SUSER_NAME(rm.role_principal_id),
'MemberName' = lgn.name ,
'Status'= Case when lgn.is_disabled=0 then 'Enabled'
else 'Disabled'
end
from sys.server_role_members rm
INNER JOIN sys.server_principals lgn
ON rm.member_principal_id = lgn.principal_id
where rm.role_principal_id = SUSER_ID('sysadmin')
Should it be a concern that the accounts starting with NT SERVICE are sysadmin?
the sql server agent service is running under the account shown above in the item number 10, so maybe the number 7 is even redundant, how can I find it out?
There is a similar question:
