mSQL 2000 using DBCC CHECK DB to derive error, slot reference error

Source: Internet
Author: User

Transferred from: http://www.cnblogs.com/firstrose/p/4256257.html

A SQL2000 database with an error when upgrading to 2005 by means of a backup/restore method:



Finding a workaround has no effect

Just recently looking at the "SQL Server Trip" on the farm, just want to try to solve this problem yourself

Run the DBCC CHECKDB command first, with the following results:



Look closely at the error message, which repeatedly mentions an "object ID 2". In addition, the message mentions that the owner of the text is a data record identified by RID = (1:152:9) id = 213575799 and indid = 37. Think of the recent SQL Server tour, which suggests that the second piece of information might be a data table. So select the following:



Sure enough, there is a corresponding table!

Select the two tables separately and find that the problem is on the sysindexes:



This is consistent with the error message above.

Immediately try to repair with DBCC CHECKDB and DBCC CHECKTABLE, but get the following response:

The repair level of the DBCC statement caused the fix to be avoided

At this point try to enter a dead end ...

Once again, it's interesting to see 2 of the error messages. One says that a node is not referenced, and one says that no other node is found. The slot number and text ID of the two nodes are the same, only the pages are different. The hand looked at the page number, found 342=0x156,4194646=0x400156, only a byte!

Brainwave, this mistake must be the page number because of some reason wrong!

Suddenly remembered, in the DBCC command that article mentioned DBCC IND command, simply dead Horse as live horse Medicine:



But I don't see any ghosts, obviously I don't have that level ...

Simply page:



Find the Slot9 offset and see if there are 0x400156:



It seems luck ...

Refer to "Sixth station", go offline, open MDF, find Slot9 corresponding offset 8192*152+0x860=0x130860, change that 40 to 00



Online, DBCC CHECKDB, no errors detected!

Try again in SQL2005 to recover, success!

Additional harvest: SQL2000 seemingly no checksum, or I will change MDF should be an error.

mSQL 2000 using DBCC CHECK DB to derive error, slot reference error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.