DBCC CheckDB in Maintenance plan

  • I inherited a maintenance plan on a 2012 server that has Database Integrity Check as the first step of many. When it kicks off that is the only step that runs, it never rolls to the next task. The logs show success for that step then that's it, like it is the only thing in the plan. Has anyone else ever run into this with DBCC CHECKDB in a maintenance plan?

    EDIT: This is a 2012 server, i put this in the wrong forum.

  • I got the answer from outside this forum but i wanted to post in case someone else sees this. If 2 (or more) conditions feed to a task BOTH conditions must be satisfied for the task to kick off. Note the 2 green arrows going to rebuild index. This is requiring the Integrity check to be successful AND the notification be successful but this will never happen because the Notification will only kick off on failure. The same issue will occur with the backup block. I wasn't aware that this was the behavior because every time i set these up i have only one linear stream. This was set up by the vendor so i assumed it was just "the way they did it" apparently it doesn't work this way. I will take the green lines off of the alerts as i don't really want to continue anyway if my DBCC CHECKDB fails, why would i want to backup a corrupted DB?

    Thanks to Mötz Jensen @splaxi on twitter for showing me the issue.

  • dkimberlin 14111 - Monday, December 10, 2018 11:33 AM

    I got the answer from outside this forum but i wanted to post in case someone else sees this. If 2 (or more) conditions feed to a task BOTH conditions must be satisfied for the task to kick off. Note the 2 green arrows going to rebuild index. This is requiring the Integrity check to be successful AND the notification be successful but this will never happen because the Notification will only kick off on failure. The same issue will occur with the backup block. I wasn't aware that this was the behavior because every time i set these up i have only one linear stream. This was set up by the vendor so i assumed it was just "the way they did it" apparently it doesn't work this way. I will take the green lines off of the alerts as i don't really want to continue anyway if my DBCC CHECKDB fails, why would i want to backup a corrupted DB?

    Thanks to Mötz Jensen @splaxi on twitter for showing me the issue.

    You can change the constraint from AND to OR - that way either task can be successful for the next task to be executed.  With that said - I would restructure the plan so there was only one failure notification with an OR condition from all other tasks on failure.  The constraints between the actual tasks would remain as AND condition...

    Also - you really don't want to perform backups if the integrity check fails.  Send the notification and fix the problem - otherwise you may just end up not having a good backup to restore from available when you need to recover that database from backups because of the corruption.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply