When deploying RockSolid jobs to availability groups it is important to target all nodes in the availability group to ensure that jobs will be probably deployed at all stages of fail-over. However, RockSolid will only deploy jobs to the relevant nodes based on the Availability Group configuration within RockSolid.
Availability Group Configuration
Within the Manage Availability Group page you can specify node locations for:
- Backup Location
- DBCC Location
SQL Server allows these jobs to be deployed on either the primary or secondary nodes in certain configurations. Index and stats management jobs can only be deployed on the primary node. Changing the availability group configuration and saving will cause jobs to be re-deployed on the specified node. In the event of a fail-over the jobs will also be re-deployed to the new node.
Job Deployment Logic
The following logic is used to deploy jobs in an availability group configuration
- Backup Jobs - Deployed on the primary node or the secondary node if configured within the availability group configuration.
- DBCC Jobs - Deployed on the primary node or the secondary node if configured within the availability group configuration.
- ReIndex Jobs - Deployed always on the primary node.
- Update Stats Jobs - Deployed always on the primary node.
- Combined Maintenance Jobs - Deployed always on the primary node.
If you want DBCC's to run on the secondary node please do not use a Combined Maintenance window. Instead create separate windows for index maintenance, stats management and DBCC maintenance. RockSolid will automatically deploy the relevant jobs to the relevant nodes.