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 |
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-06-09 : 03:02:47
|
I've been asked to do some checking on a weekly houskeeping job created by a 3rd party vendor. The job loops through a number of tables (roughly 800) and does a DBCC CHECKTABLE (tablename) on them one by one but the output of the DBCC isn't logged anywhere. Last night the job failed and I'm trying to find out what the error was but it seems that I can't to save my life without running the whole shabang again. The sql error log doesn't say anything...- LumbagoMy blog-> http://thefirstsql.com/2011/02/07/regular-expressions-advanced-string-matching-and-new-split-function-sql-server-2008-r2/ |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-06-09 : 03:36:07
|
Should be in the job's history, though that's often truncated.The error log should have the summary, not the detil (CheckTable found X consistency errors and y allocation errors)--Gail ShawSQL Server MVP |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-06-09 : 03:51:31
|
Thanx Gail but the error log only has the ones that succeeded and the step output of the job is of course truncated. It did however say "Sql Message ID 2501" in the job step execution properties and according to google this message means that a dbcc-command was run against a table that doesn't exist in the database. Now I need to figure out which that is... :)- LumbagoMy blog-> http://thefirstsql.com/2011/02/07/regular-expressions-advanced-string-matching-and-new-split-function-sql-server-2008-r2/ |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-06-09 : 05:10:57
|
I usually set jobs like that to output to a text file. Easiest way of debugging.--Gail ShawSQL Server MVP |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-06-09 : 05:19:18
|
Me too. Unfortunately I didn't create this job :) What I was hoping for was some kind of script sort of like the one Paul Randall ha smade that checks the last good date of a DBCC CHECKDB for all databases. Was hoping there was something similar for tables...- LumbagoMy blog-> http://thefirstsql.com/2011/02/07/regular-expressions-advanced-string-matching-and-new-split-function-sql-server-2008-r2/ |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-06-09 : 08:03:34
|
Can't you just run CHECKTABLE manually? Maybe this might help:http://weblogs.sqlteam.com/robv/archive/2010/06/18/61154.aspx |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-06-09 : 09:06:30
|
Yes I can of course run it manually but we are talking about 800 tables with more than 100 of them having several millions of rows. I was looking for a way to find the failing table without running the checktables again but as it seems there are none. But thanx anyway for the link Rob, nice with the tableresults for the various commands :)- LumbagoMy blog-> http://thefirstsql.com/2011/02/07/regular-expressions-advanced-string-matching-and-new-split-function-sql-server-2008-r2/ |
|
|
|
|
|