From: Erland Sommarskog on
Marlacoba (Marlacoba(a)discussions.microsoft.com) writes:
> I'm receiving a 8115 arithmetic overflow error on a DBCC CHECKTABLE.
> The clustered index is on a datetime column.
> There are 20 million rows.
> Version 8.00.2039 - I'm about to patch to 2187.
> The indexes were rebuilt without error.

One thing you could try is to run the Profile while you run DBCC CHECKTABLE.
Include all SP,T-SQL and Error events. You will see some internal commands
that DBCC emits. Maybe the error can be connected to any of these
commands. For instance, if there is command that is Starting and followed
by an exception, that is a clue.

Not that this will give the answer, but we will be one step on the way.


--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
From: Marlacoba on
There is a numeric with length 17 precision 38 and scale 0.
The min and max values for that column fit within those constraints.

And just so I'm clear on this, this error occurs from running the DBCC it's
not an error reported by DBCC. DBCC fails to run! CHECKDB WITH PHYSICAL_ONLY
does succeed.

I can do a restore on 2005 and use WITH DATA_PURITY.

Dan

From: Marlacoba on
Immediately following this query I get the 8115 error.
SELECT @BlobEater = CheckIndex(FactKeyA + FactKeyB + Facts) FROM
(SELECT TOP 100 PERCENT FactKeyA, FactKeyB, Facts FROM { IRowset 0xB883765D }
ORDER BY FactKeyA, FactKeyB) as SortedFacts
GROUP BY FactKeyA OPTION(ORDER GROUP)

The trace showed DatabaseID 0. When I try running the query manually I get
the error "checkindex' is not a recognized function name." I don't see
CheckIndex in any of the databases.

Dan

From: Erland Sommarskog on
Marlacoba (Marlacoba(a)discussions.microsoft.com) writes:
> Immediately following this query I get the 8115 error.
> SELECT @BlobEater = CheckIndex(FactKeyA + FactKeyB + Facts) FROM
> (SELECT TOP 100 PERCENT FactKeyA, FactKeyB, Facts FROM { IRowset
> 0xB883765D }
> ORDER BY FactKeyA, FactKeyB) as SortedFacts
> GROUP BY FactKeyA OPTION(ORDER GROUP)

But does this query complete? That is, do you see a StmtCompleted for it?

> The trace showed DatabaseID 0. When I try running the query manually I get
> the error "checkindex' is not a recognized function name." I don't see
> CheckIndex in any of the databases.

That query is some internal mumbo-jumbo that makes use of functions
that is not available to the general public.


--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
From: Marlacoba on
"Erland Sommarskog" wrote:

> But does this query complete? That is, do you see a StmtCompleted for it?
Doesn't get to StmtCompleted the error comes directly after the StmtStarting.

SQL:BatchStarting DBCC CHECKTABLE (Observances)
SQL:StmtStarting DBCC CHECKTABLE (Observances)
SP:StmtStarting SELECT @BlobEater = CheckIndex(FactKeyA + FactKeyB + Facts)
FROM
(SELECT TOP 100 PERCENT FactKeyA, FactKeyB, Facts FROM { IRowset 0xB8C3943E }
ORDER BY FactKeyA, FactKeyB) as SortedFacts
GROUP BY FactKeyA OPTION(ORDER GROUP)
Exception Error: 8115, Severity: 16, State: 1
Exception Error: 8115, Severity: 16, State: 1
Exception Error: 8115, Severity: 16, State: 1
Exception Error: 8115, Severity: 16, State: 1
SQL:BatchCompleted DBCC CHECKTABLE (Observances)

Dan