{"name":"Principals with sysadmin login","description":"This metric counts the number of principals who are members of the sysadmin fixed server role. SQL Server relies on role-based security to manage permissions. If multiple IT system administrators have permissions to set up new SQL Server logins, they might be inclined to do so as part of the sysadmin role. Adding a normal user to the sysadmin role could pose a security risk and is not recommended unless the principal is highly trusted. If this count is higher than expected, contact system administrators to find out which principals were recently given access and why.","tsql":"SELECT COUNT(spm.name)\r\nFROM sys.server_role_members srm, sys.server_principals sp, sys.server_principals spm WHERE sp.name = 'sysadmin'\r\nAND sp.principal_id = srm.role_principal_id AND spm.principal_id = srm.member_principal_id;","instances":true,"frequency":60,"databases":{"mode":1},"rateofchange":false,"metricenabled":true,"alertname":"Principals with sysadmin login increased ","alertdescription":"This alert is raised when the number of principals who are members of the sysadmin fixed server role goes above the threshold specified.\r\nTo set a different threshold for each SQL Server you're monitoring, install the metric and then follow the instructions on Customizing settings in <a href=\"http:\/\/documentation.red-gate.com\/display\/SM35\/Configuring+alerts\" title=\"Configuring alerts\">Configuring alerts<\/a>.","aboveorbelow":"above","collections":1,"alertenabled":true,"_thresholds_high":{"selected":false},"_thresholds_medium":{"selected":false},"_thresholds_low":{"selected":false},"thresholds_comment":"Note: To set a different threshold for each SQL Server you're monitoring, install the metric and then follow the instructions on Customizing settings in <a href=\"http:\/\/documentation.red-gate.com\/display\/SM35\/Configuring+alerts\" title=\"Configuring alerts\">Configuring alerts<\/a> (SQL Monitor documentation).","targetentitytype":0}