Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
add comment

migrated from stackoverflow.com Jan 21 '12 at 23:29

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 2 down vote accepted

Use DBCC PAGE:

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

and check the slot 13.

share|improve this answer
    
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. –  Moo MinTroll Jun 18 '10 at 11:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.