Run Book: Backup Strategy for Always On SQL Server Cluster
1. Prerequisites
- SQL Server Always On Availability Groups configured.
- Ola Hallengren's Maintenance Solution scripts downloaded and installed.
- SQL Server Agent running.
Run Book: Backup Strategy for Always On SQL Server Cluster
2. Download and Install Ola Hallengren's Maintenance Solution
- Download the scripts from https://ola.hallengren.com/.
- Execute the downloaded script (MaintenanceSolution.sql) on your SQL Server instance.
Run Book: Backup Strategy for Always On SQL Server Cluster
3. Configure Backup Jobs
Full Backup (Weekly)
1. Create a new SQL Server Agent Job:
- Name: Full Backup
- Schedule: Weekly (e.g., every Sunday at 2 AM)
2. Job Step:
- Type: Transact-SQL script (T-SQL)
- Command:
EXECUTE dbo.DatabaseBackup
@Databases = 'USER_DATABASES',
@Directory = 'C:\Backup',
@BackupType = 'FULL',
@Verify = 'Y',
@CleanupTime = 168,
@CheckSum = 'Y',
@LogToTable = 'Y'
Differential Backup (Daily)
1. Create a new SQL Server Agent Job:
- Name: Differential Backup
- Schedule: Daily (e.g., every day at 2 AM except Sunday)
2. Job Step:
- Type: Transact-SQL script (T-SQL)
- Command:
EXECUTE dbo.DatabaseBackup
Run Book: Backup Strategy for Always On SQL Server Cluster
@Databases = 'USER_DATABASES',
@Directory = 'C:\Backup',
@BackupType = 'DIFF',
@Verify = 'Y',
@CleanupTime = 168,
@CheckSum = 'Y',
@LogToTable = 'Y'
Transaction Log Backup (Every 15 Minutes)
1. Create a new SQL Server Agent Job:
- Name: Transaction Log Backup
- Schedule: Every 15 minutes
2. Job Step:
- Type: Transact-SQL script (T-SQL)
- Command:
EXECUTE dbo.DatabaseBackup
@Databases = 'USER_DATABASES',
@Directory = 'C:\Backup',
@BackupType = 'LOG',
@Verify = 'Y',
@CleanupTime = 168,
@CheckSum = 'Y',
@LogToTable = 'Y'
Run Book: Backup Strategy for Always On SQL Server Cluster
4. Verify Backup Jobs
- Ensure all jobs are enabled.
- Monitor the SQL Server Agent job history to confirm successful execution.
Run Book: Backup Strategy for Always On SQL Server Cluster
5. Maintenance and Monitoring
- Regularly check the backup directory for the presence of backup files.
- Review the logs generated by the maintenance scripts for any errors or warnings.