Online Documentation for SQL Administrator for SQL Server

Precedence constraints


Use the Precedence constraints section to establish relationships between the tasks.

 

Maintenance plans - Maintenance Plan Editor - Managing tasks - Precedence constraints

 

 

Preceding executables

In this area define tasks after which the configured maintenance task should run.

After that choose whether !RadioButton To execute the task all constraints must be True (Logical AND) or !RadioButton To execute the task one constraint must be True (Logical OR).

 

Subsequent executables

Here define tasks that should run after the configured maintenance task.

 

Using the context menu of both areas you can:

Create Add a new constraint

Edit Edit an existing constraint

Drop Delete constraint

Alternatively, you can use the 'Insert' button to create a constraint, 'Enter' button to edit constraint and 'Delete' button to drop a constraint.

 

Maintenance plans - Maintenance Plan Editor - Managing tasks - Precedence constraints - Edit constraint

 

 

The second task (the Constrained executable) executes only if the execution result of the first task (the Preceding executable) matches specified criteria. You can set this criteria by checking the !CheckBox Preceding execution result is and/or !CheckBox Expression evaluates to True.

 

The execution result may be specified as !RadioButton Success, !RadioButton Failure or !RadioButton Completion.

Success requires that the precedence executable succeed, Failure requires that the precedence executable fail, and Completion indicates that the constrained executable should run regardless of whether the precedence task succeeds or fails.

 

!CheckBox Expression evaluates to True

An expression that is evaluated to determine whether the constrained executable runs. If the expression evaluates to true, the constrained executable runs.

 

 


See also:

Backup database

Check database

Rebuild indexes

Reorganize indexes

Shrink database

Update statistics

Execute job

Execute T-SQL statement

Notify operator

Clean up history

Clean up maintenance log