Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1234

DBCC CHECKDB - how use it in a maintenance plan ? Expand / Collapse
Author
Message
Posted Monday, September 27, 2010 11:59 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 6:43 AM
Points: 1,523, Visits: 2,201
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?


Jason Shadonix
MCTS, SQL 2005
Post #993881
Posted Monday, September 27, 2010 12:06 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 7:39 AM
Points: 43,025, Visits: 36,189
Please rather post new questions in a new thread. Thanks


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #993885
Posted Friday, March 14, 2014 12:26 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, March 23, 2014 6:48 PM
Points: 2, Visits: 4
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?
Post #1551028
Posted Friday, March 14, 2014 2:11 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, March 23, 2014 6:48 PM
Points: 2, Visits: 4
Hi, woops - thought the other reply disappeared.
Post #1551042
« Prev Topic | Next Topic »

Add to briefcase «««1234

Permissions Expand / Collapse