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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 dbcc found errors

Author  Topic 

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2007-05-07 : 08:55:56
8957 :DBCC CHECKDB (covel_db) executed by ITAPE\SQLAdmin found 57352 errors and repaired 0 errors

i was planning to backup the db. Create a new db and restore it from the backup.

i dunno if this will do it. or how do i find the errors and fix it?


i used dbcc checkdb and i found
Table error: Object ID 1049658119, index ID 0, page (1:604080), row 31. Record check (innerLength <= innerColInfo.CbMaxLen () && innerPCol != NULL) failed. Values are 17 and 9.
Server: Msg 2537, Level 16, State 1, Line 3
Table error: Object ID 1049658119, index ID 0, page (1:604080), row 31. Record check (Valid SqlVariant) failed. Values are 6 and 0.
Server: Msg 2537, Level 16, State 1, Line 3

Kristen
Test

22859 Posts

Posted - 2007-05-07 : 12:26:14
"i was planning to backup the db. Create a new db and restore it from the backup."

That will almost certainly give the same error(s)

restoring from an earlier backup (to your "new db"), and using

DBCC CHECKDB NO_INFOMSG

would help establish WHEN the corruption occurred, and how far back you have to go to get a clean copy.

If your database is in FULL Recovery Model going back until you get a Clean Full backup, and then restoring ALL TLog backups since, might give you an up-to-date and clean database.

Do not overwrite your current database until you are sure you have found clean backups.

Check you SQL and Windows Event logs for any hardware errors on your drives / memory / etc

Kristen
Go to Top of Page

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2007-05-07 : 16:18:54
will this help. But thedb needs to be in single mode..


dbcc checktable (REPAIR_REBUILD)
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2007-05-07 : 16:33:29
quote:
Originally posted by funketekun

will this help. But thedb needs to be in single mode..


dbcc checktable (REPAIR_REBUILD)





you should really post this in the Data Corruption forum here http://sqlteam.com/forums/forum.asp?FORUM_ID=22


-ec
Go to Top of Page

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2007-05-07 : 17:16:33
kriten,

.
.
.
.
.
.
Table error: Object ID 1049658119, index ID 0, page (1:730277), row 19. Record check (innerLength <= innerColInfo.CbMaxLen () && innerPCol != NULL) failed. Values are 17 and 9.
Server: Msg 2537, Level 16, State 43, Line 1
Table error: Object ID 1049658119, index ID 0, page (1:730277), row 19. Record check (Valid SqlVariant) failed. Values are 6 and 0.
Server: Msg 2537, Level 16, State 1, Line 1
Table error: Object ID 1049658119, index ID 0, page (1:730277), row 52. Record check (innerLength <= innerColInfo.CbMaxLen () && innerPCol != NULL) failed. Values are 17 and 9.
Server: Msg 2537, Level 16, State 1, Line 1
Table error: Object ID 1049658119, index ID 0, page (1:730277), row 52. Record check (Valid SqlVariant) failed. Values are 6 and 0.
Server: Msg 8986, Level 16, State 1, Line 1
Too many errors found (201) for object ID 1049658119. To see all error messages rerun the statement using "WITH ALL_ERRORMSGS".
CHECKTABLE found 0 allocation errors and 57352 consistency errors in table 'CLAIMS_AUDIT_TRAIL' (object ID 1049658119).
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKTABLE (dyacovel_db.dbo.CLAIMS_AUDIT_TRAIL ).
Go to Top of Page

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2007-05-07 : 22:51:11
repair_rebuild didnt work.

i made a replica of the table with the records. Dropped the original table. Used select into to create back the table. It worked.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-05-08 : 02:19:50
"It worked."

Well if DBCC CHECKDB NO_INFOMSG is giving NO errors then you are good to go!

Kristen
Go to Top of Page
   

- Advertisement -