olahallengren/sql-server-maintenance-solution
olahallengren/sql-server-maintenance-solution has 3,529 GitHub stars and 887 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-08 16:39 UTC. Last push 2026-09-12.
SQL Server Maintenance Solution
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalSQL Server Maintenance Solution
Getting Started
Download the script for your platform:
- MaintenanceSolution.sql: SQL Server 2017, SQL Server 2019, SQL Server 2022, SQL Server 2025, and Azure SQL Managed Instance. This script creates all the objects and jobs that you need.
- MaintenanceSolutionAzureSQLDatabase.sql: Azure SQL Database. This script creates the objects for integrity check and index and statistics maintenance.
You can also download the objects as separate scripts:
- DatabaseBackup.sql: Stored procedure to back up databases
- DatabaseIntegrityCheck.sql: Stored procedure to check the integrity of databases
- IndexOptimize.sql: Stored procedure to rebuild and reorganize indexes and update statistics
- CommandExecute.sql: Stored procedure to execute and log commands
- CommandLog.sql: Table to log commands
- Queue.sql: Table for processing databases in parallel
- QueueDatabase.sql: Table for processing databases in parallel
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 verify the scripts against the SHA-256 checksums in SHA256SUMS.txt.
Documentation
- SQL Server Backup: website · repository
- SQL Server Integrity Check: website · repository
- SQL Server Index and Statistics Maintenance: website · repository
- Frequently Asked Questions: website
- Version History: website
Explore related projects
Asabeneh/30-Days-Of-Python
The 30 Days of Python programming challenge is a step-by-step guide to learn the Python programming language in 30 days. This challenge may take more than 100 days. Follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,370 starsgrafana/grafana
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
77,763 starsredis/redis
For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.
77,288 starsapache/superset
Apache Superset is a Data Visualization and Data Exploration Platform
75,453 stars