SQL Server Maintenance Solution

Downloads

Download the script for your platform:

You can also download the objects as separate scripts:

Note that you always need CommandExecute; DatabaseBackup, DatabaseIntegrityCheck, and IndexOptimize use it.

When you update DatabaseBackup, DatabaseIntegrityCheck, or IndexOptimize, you should also update CommandExecute.

You need CommandLog if you are going to use the option to log commands to a table.

You can download the last version of the SQL Server Maintenance Solution that runs on older SQL Server versions: SQL Server 2005 | SQL Server 2008 to 2016

The SQL Server Maintenance Solution is available on GitHub.

You can verify the scripts against the SHA-256 checksums in SHA256SUMS.txt.

Script to check version timestamps: VersionCheck.sql

Sign up for the newsletter to be alerted about updates to the solution.