SQL Server detected a consistency-based logical I/O error checksum is incorrect | | Attempt to extract logical page (1:1640) in database 5 failed

Source: Internet
Author: User

For a single database error, run this fix not. Then I was able to run it in tempdb.

DBCC CHECKDB (' tempdb ')

In fact, there was another mistake at the beginning:

An attempt to extract a logical page (1:1640) in database 5failed. This logical page belongs to the allocation unit XXX, not xxx. 
Use Master declare @databasename varchar (255)    Set@databasename ='the name of the database entity that needs to be repaired'exec sp_dboption @databasename, N' Single'N'true'--set the target data library to single-user status DBCC CHECKDB (@databasename, Repair_allow_data_loss) DBCC CHECKDB (@databasename, Repair_rebuild) E Xec sp_dboption @databasename, N' Single'N'false'--Set the target data base to multi-user state

This has no effect, running to half the error, there is nothing to do. Helpless under TRUNCATE TABLE test, and then insert data from the new. Of course, the premise of doing this is that your data is backed up. Otherwise, it is not readable from the corrupted table.

This table fixes the method also does not have the use.

use the name of the database entity that needs to be repaired declare @dbname varchar (255)   Set@dbname ='name of the database to be repaired'exec sp_dboption @dbname,'Single user','true'DBCC CHECKTABLE ('name of the data table to be repaired', Repair_allow_data_loss) DBCC CHECKTABLE ('name of the data table to be repaired', Repair_rebuild)------Change the name of the data table that needs to be repaired to the name of the data table that executes the DBCC CHECKDB times error exec sp_dboption @dbname,'Single user','false'  

DBCC dbreindex (table name, ') fixes all indexes on this table. This method is useless.

DBCC Checkalloc
Checks the consistency of the disk space allocation structure for the specified database. This is not enough for me to see any problems.

The larger the database, the longer the repair. or be ready to back up at any time.

I system win10+sql2008, in the installation of sql2008 when the system is not compatible, but can be installed successfully and run, not clear what causes. Hope to have a master can answer. I have never met this problem before in Win7.

SQL Server detected a consistency-based logical I/O error checksum is incorrect | | Attempt to extract logical page (1:1640) in database 5 failed

Related Article

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.