SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


DBCC CHECKDB - how use it in a maintenance plan ?


DBCC CHECKDB - how use it in a maintenance plan ?

Author
Message
TheRedneckDBA
TheRedneckDBA
SSCarpal Tunnel
SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)

Group: General Forum Members
Points: 4163 Visits: 2613
I know this is an old thread, but a question.

If you have a SQL job running DBCC checks, and a check finds an error, does it raise an error so the job reports failure, or do you need to parse through the logs it generates each time it runs and look for errors manually?

The Redneck DBA
GilaMonster
GilaMonster
SSC Guru
SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)

Group: General Forum Members
Points: 219529 Visits: 46279
Please rather post new questions in a new thread. Thanks

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


DavidB 36561
DavidB 36561
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 Visits: 27
Hi, (Caveat - I am only a very part time self taught SQL Admin and have been relying on things read recently.)

If the Maintenance tasks are linked within the one maintenance plan and you start with the verify then the back up will not proceed unless the dbcc checkdb suceeds. What I haven't yet determined is what the DBCC check task classes as a success - presumably no errors.

But you may still want the backup to proceed even if there are errors - but what you definitely do not want is the old backups to be removed as they may be needed if your database is indeed nastily corrupted?

So it seems that doing the backup first, then the checkdb, then the cleanup of old .bak files then trn files is a good option. The backup still happens but the checkdb will, if it fails, prevent the bak and trn files that you might need from being removed. Obviously space could become an issue if it is left unresolved for a period. Also this relies on no other maintenance plan deleting the .bak or .trn files.

Does this sounds sensible to those with lots of experience?
DavidB 36561
DavidB 36561
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 Visits: 27
Hi, woops - thought the other reply disappeared.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search