April 10, 2012 at 5:26 am
Hi All,
If I call DBCC CheckDB from a JOB and the integrity check fails (for what ever reason) does the error bubble up and cause the job to fail?
Cheers,
April 10, 2012 at 7:20 am
April 10, 2012 at 9:02 am
Gianluca Sartori (4/10/2012)
Nope. You could tweak my consistency check procedure[/url] to fit your needs.
Thanks for the reply - nice post too.
However, i've done some searching around and have found a nice msdn blog which suggests that an agent job will fail http://blogs.msdn.com/b/cindygross/archive/2010/06/13/dbcc-checkdb-database-integrity.aspx
i'll do some testing by creating a test database, corrupting a page and running the checkdb command to see what happens http://www.littlekendra.com/2011/01/24/corrupthexeditor/
April 10, 2012 at 9:56 am
I can confirm that if DBCC CheckDB errors during an agent job then the agent will throw an error
I followed the post above to corrupt a database and my job threw the error.
This is what my job ran: EXEC sp_MSforeachdb "USE [?]; DBCC CHECKDB WITH PHYSICAL_ONLY";
April 10, 2012 at 3:42 pm
Totally misread your question, sorry.
I thought you wanted to avoid the job failure...
-- Gianluca Sartori
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy