Alerts

  • I run a DBCC CHECKDB on a weekly basis (SQL 2K sp3). So far, no errors found. I recently configured SQL mail which will report any SQL Agent jobs that fail. My CHECKDB is also a SQL Agent job. Even if it finds errors, the job will run to completion. How do I create an alert if the job does report an error? Is there some way to read the log and determine if the returned results from the CHECKDB are anything other than 0? Thanks for any and all replies to this topic.

    Terry


    Terry

  • DBCC CHECKDB will write an entry to SQL Server errorlog once it completes. You can search specific message in the errorlog.

    Modify following script to meet your needs.

    http://www.sqlservercentral.com/scripts/contributions/952.asp

  • Also, since DBCC CHECKDB runs as a job, you should be able to check msdb..sysjobhistory for sql_severity and run_status flag(s)...

    Will that work Allen?

    Wize

  • The job history table will tell you whether job itself completes or not only. If dbcc checkdb find any errors, it will report the errors in SQL Server errorlog.

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

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