HOW TO: How to have RockSolid Automatically Remove Maint Jobs for Dropped Databases

This article refers to RockSolid automatically removing RockSolid create database maintenance jobs that have been deployed by RockSolid automated management. For this to occur the Automated Management option must be enabled.

RockSolid treats the removal of automatically deployed RockSolid maintenance jobs as an independent process to the deployment of those jobs. This allows you to control if you require these jobs to be removed automatically once a database has been removed from an instance. The removal of jobs will only occur if:

RockSolid management jobs had previously been deployed for the relevant databases and

The Drop Job change control has been granted for the relevant instances.

All of these options must be set for jobs to be removed, however options 1-3 must also be enable for jobs to be deployed initially. Therefore in this article we only focus on option #4, the additional option required over and above the job deployment requirements.

Drop Job Change Control

Before RockSolid can make a change on a SQL Server instance the relevant change authority must be granted. This can be granted on a case by case basis, but is more commonly granted automatically once configured via the RockSolid console. To allow RockSolid to clean up jobs that have been deployed, and the database subsequently dropped, you must grant the Drop Job change control. To do this:

Go to Service Requests -> Manage Change Control from the RockSolid menu.

Click the Auto Approve Tab.

Choose "Drop Job" from the Task drop down menu.

Next you need to assign this approval to the relevant scope. While you can grant this on an instance by instance basis normally this approval will be granted to a specific group. Choose the group from the Group drop down.

Click the "Add Auto Approval" button to confirm.

Once you have added the approval RockSolid will have the authority of removing jobs immediately. However jobs may not be removed until the job removal planning cycle runs, which may take several minutes.

NOTE: Jobs will be removed for databases that have been removed from an instance or in a state which prevents the job from executing (such as offline). Job removals may be delayed so potentially jobs may fail if executed between the time when the database is dropped and the time when the job is removed.