POPMAINT is a command-line SQL Server maintenance solution similar to SQL Server Maintenance Plans. It is based on GIT-friendly configuration files. This is currently under active development and EVERYTHING is subject to change.
This project exists for two reasons. First, I want a way to centralize SQL Server maintenance. I am tired of deploying jobs to every server and then trying to change their schedules or activities. And I even wrote a tool to deploy jobs to every server!
Second, I want to handle blocking. Indexing can block. Other maintenance tasks can block. POPMAINT polls the server every second and kills the maintenance if it is blocking anything. This will soon be expanded to pause for high Availability Group send and recieve queues.
- Command-line application that supports scheduling through SQL Server Agent or other job scheduling application. I run it from our central ActiveBatch server.
- Configuration via GIT-friendly files
- Log to the console or JSON
- Spread load across servers, time, and time zones
- Track state to resume where it left off and limit load
- DBCC
- Supports all DBCC options
- Limit cores and runtime to throttle load
Our use case for this is to add a new server by editing a file and committing to GIT. Everything beyond that should be automated.
-
Unzip the files to a local folder
-
Create
./plans/sample.toml
servers = ["localhost"] [checkdb] time_limit = "60m" included = ["master", "msdb", "model"] no_index = true physical_only = true
-
Run the executable and execute the plan:
popmaint sample
. This will run as the current user and requiresdb_owner
permissions on these databases.
This will run DBCC against the system databases.
- CHECKDB skips
tempdb
- MAXDOP settings now include an option to set a percentage of the server MAXDOP
- Fixed the display format of the last time DBCC ran in the log
- First public release