patternsqlMinor
Use sp_Blitz to gather information on all servers in a centralized server/database
Viewed 0 times
sp_blitzallserversdatabasecentralizedserverusegatherinformation
Problem
I am using sp_Blitz, and want to use it to execute the checks on all of my SQL Servers and have it write the results to a single table.
Do I need to create linked servers on the central instance to connect to the other instances, or is there some other way to input the server names into the
Do I need to create linked servers on the central instance to connect to the other instances, or is there some other way to input the server names into the
sp_Blitz stored procedure?Solution
Brent Ozar folks already have got you 50% - Inserting sp_Blitz® Output Into a Table
My steps would be :
My steps would be :
- Log the output to a local dbastats or some dba database.
- Have a list of all sql servers in your central server.
- use sqlcmd and opendatasource to query remote servers and dump all the info into centralized server .. make sure you include something like collection_datetime and server_name. You can use powershell (Write-DbaDataTable) as well.
- schedule above logic using sqlagent job as per your needs.
- Make sure you have proper purge policy defined locally per server. I would add custom column like
notified = 0 (as default) and update to 1 when you dump the data into central database. Thecollection_datetime and server_namewill help you find out what has changed or do aggregation per server instance.
Context
StackExchange Database Administrators Q#163378, answer score: 6
Revisions (0)
No revisions yet.