Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Using SQL Server 2008/R2 Maintenance Plans to setup some automated backups/cleanups and notifications. One thing that I can't figure out is what is the difference between Success and Completion?

The way I think about it, is that completion doesn't care if the job failed or succeeded, but if it failed, then obviously it didn't complete maybe??

Perhaps its left there in case of scripts where there might not be a way to tell what the actual outcome was, just that the script completed, but this still feels like its the same as success and failed.

I couldn't find much documentation for it either.

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

The execution result, in your case, success, completion, or failure is a precedence link that can create a relationship between two tasks. From BOL

A precedence link between two tasks establishes a relationship between the tasks. The second task (the dependent task) executes only if the execution result of the first task (the precedent task) matches specified criteria. Typically the execution result specified is Success, Failure, or Completion

If you wanted to say, have your plan execute a statement that was not designed around success or failure you could use completion to establish a relationship and proceed to the next task.

Example: Purge all records of type 'A' from database [ABC], then execute a database backup - You don't care how many records, if any, were found or deleted. Just run the statement. When it is done, back up the database

Example: Reorganize the index's of database [ABC] only after successfully checking the integrity. If the integrity check fails, do not reorganize the index's

Maint. Plans

Precedence Constraints

share|improve this answer
add comment
  • Failure: When there is some issue in job execution.
  • Success: When the job executed successfully.
  • Completion: This will contain the completion of SQL job whether it completes successfully or with issues....

SQL JOB can be mapped with database mail service for e-mail notifications. These mails will contain the information about success/failure of SQL job.

If any issue occurred in job execution, Job history can be viewed for the root cause of error.....

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.