This fork from https://github.com/olahallengren/sql-server-maintenance-solution is to address requests for support to use Amazon RDS for SQL Server.
This repo will accept pull requests related to that specific functionality but larger functionality requests should continue to be presented to the upstream repo as the owner of the original code. Unfortunately, we are a small team and do not have the bandwidth to review and accept PRs outside of this scope.
Download MaintenanceSolution.sql. This script creates all the objects and jobs that you need.
You can also download the objects as separate scripts:
- DatabaseBackup: SQL Server Backup
- DatabaseIntegrityCheck: SQL Server Integrity Check
- IndexOptimize: SQL Server Index and Statistics Maintenance
- CommandExecute: Stored procedure to execute and log commands
- CommandLog: Table to log commands
Note that you always need CommandExecute; DatabaseBackup, DatabaseIntegrityCheck, and IndexOptimize are using it. You need CommandLog if you are going to use the option to log commands to a table.
Supported versions: SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Server 2019, SQL Server 2022, Azure SQL Database, Azure SQL Managed Instance and Supported Amazon RDS for SQL Server Versions
- Backup: https://ola.hallengren.com/sql-server-backup.html
- Integrity Check: https://ola.hallengren.com/sql-server-integrity-check.html
- Index and Statistics Maintenance: https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html
- Amazon RDS for SQL Server Backup Integration: URL to be published shortly