Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rconsult
Starting Member
1 Post |
Posted - 2011-11-04 : 15:09:17
|
I have a stored procedure that I use to execute DBCC CHECKDB because it accepts an input parameter indicating which databases to run the command against: All, User, System, or a specific database name. I've set up a database maintenance job to execute this stored procedure as the first step.Step 2 uses FINDSTR to scan the output file for 'error' and put that line in a summary file.Step 3 emails that summary file to the DBAs.My question deals with error handling. How do I know when there has been an error detected during the CHECKDB? I'm assuming the stored procedure will execute successfully and, therefore, not throw an error. If I need to scan for multiple strings, how can that best be handled? Does anyone have a good file of strings to look for?Any help and recommendations would be appreciated.Stephanie |
|
chris_cs
Posting Yak Master
223 Posts |
Posted - 2011-11-07 : 06:41:40
|
If you are outputting the results of the CHECKDB to a file the SP will not throw an error if an error is detected by CHECKDB.How are you proposing to accomplish Step 2 if you haven't done it already?----------------------------Junior DBA learning the ropes |
 |
|
|
|
|