views:

18

answers:

1

Hi there,

I have restore a SQL Server 2000 database onto SQL Server 2005 and then run DBCC CHECKDB WITH DATA_PURITY and I get this error:

Msg 2570, Level 16, State 3, Line 2
Page (1:19558), slot 13 in object ID 181575685, index ID 1, partition ID 293374720802816, alloc unit ID 11899744092160 (type "In-row data"). Column "NumberOfShares" value is out of range for data type "numeric".  Update column to a legal value.

The column NumberOfShares is a numeric (19,6) data type. If I run the following

select max (NumberOfShares) from AUDIT_Table
select min (NumberOfShares) from AUDIT_Table

I get:

22678647.839110
-1845953000.000000

These values are inside the bounds of a numeric (19,6) so I'm not sure why the DBCC check fails. Any ideas to find out why it fails? Do I need to use DBCC PAGE? How would you troubleshoot this?

Thanks, Mark.

+1  A: 

Use DBCC PAGE:

DBCC TRACE(3604);
DBCC PAGE('dbname', 1, 19558, 3);

and check the slot 13.

Remus Rusanu
Thanks, the offending value was a negative zero. -0.000000. I fixed it by updating it to zero with a where NumberOfShares <0 and NumberOfShares > -0.0000001.
Mark Allison