Generate Report against the Central management Server
Hi All, I am planning to setup a report to display a list of users with sysadmin right across the environment. I have a Central management servers with about 100 servers registered and want the report to run against those server and email the report maybe on a weekly or a monthly or per-need basis to the DBA team for review. I have the below SQL to generate the list: SELECT p.name AS [Name] FROM sys.server_principals r INNER JOIN sys.server_role_members m ON r.principal_id = m.role_principal_id INNER JOIN sys.server_principals p ON p.principal_id = m.member_principal_id WHERE r.type = 'R' AND r.name = N'sysadmin' Wondering best way to do this. Any suggestions? Want to avoid the use of a cursor. Thanks.