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.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 DBCC CheckDB errors notification

Author  Topic 

rikleo2001
Posting Yak Master

185 Posts

Posted - 2011-10-14 : 11:16:39
Hi
I have maintenance plan which runs integrity checks across all databases every day.
It reports output in file and then mark job is successful, output contain 0 error or few errors all in file.
To find out consistency errors appear or not we have to log on to every single server and look for output file.

can this be automated where we get email if there are any consistency errors?

I would appreciate your response please.

Thanks

kr

SKR

Cindyaz
Yak Posting Veteran

73 Posts

Posted - 2011-10-16 : 16:29:31
You can create a script that reads that output file, searches for errors and emails you if it finds one. you can write the script in vbscript or powershell.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-10-16 : 23:07:43
You do not need to create a script to read the output file. The job will be marked as failed if there is data corruption. Have a monitoring package notify you of job failures. If you don't have software to do this, you should use Powershell.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

franco
Constraint Violating Yak Guru

255 Posts

Posted - 2011-10-18 : 03:47:36
You can create one operator and choose, under notifications, which alert or job results will be sent to this user via e-mail, pager or Net send.


Franco
Go to Top of Page

rikleo2001
Posting Yak Master

185 Posts

Posted - 2011-10-18 : 04:59:00
Hi all,

Thanks for your replies.
I have job notification to send us notification if it fails.
There were failures in output file, but job is marked as succeed.

Any other ideas?
Thanks in advance.

SKR
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-10-18 : 12:40:19
Show us the failures.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2011-10-18 : 12:41:47
STEP set to continue-on-failure, and then some other STEPs run which then results in the job finishing without error, perhaps ?
Go to Top of Page

rikleo2001
Posting Yak Master

185 Posts

Posted - 2011-10-19 : 03:49:56
Ok, I will try this, but is there a way I can change the Maintenance plan query, like it has task of DBCC CHECKDB rights, can this be modified to DBCC CHECKDB with Physical_Only...and can I add any code inside it?

SKR
Go to Top of Page
   

- Advertisement -