question

Sagar Bhargava avatar image
Sagar Bhargava asked

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.
reportcentral-management-server
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.