The "Go" attempt failed to extract the logical page () in database 5. This logical page belongs to the allocation unit XXX and not xxx

Source: Internet
Author: User

This information indicates that the database or table is partially damaged and can be attempted by the following steps:
1. DBCC CHECKDB

After restarting the server, execute the following SQL in SQL Query Analyzer to repair the database without any action, and fix the consistency errors and allocation errors that exist in the database.

Use     master          declare @databasename varchar (255)          set @databasename= ' Name of the database entity to be repaired '           exec sp_dboption @databasename, n' single ', n ' true '--to place the target database as a single-user state          DBCC CHECKDB (@databasename, REPAIR_ALLOW_DATA_LOSS)          DBCC CHECKDB (@databasename, repair_rebuild)          exec sp_dboption @databasename, N ' single ', N ' false '--to set the target data base to multi-user state    

And then execute

DBCC CHECKDB (' name of the database entity that needs to be repaired ')  

Check whether the database still has errors. Note: Repair may result in loss of some data.
2. DBCC checktable
If the DBCC CHECKDB check still has errors, you can use DBCC CHECKTABLE to fix them.

    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          )------ put ' The name of the data table that needs to be repaired changes to the name of the data table executing the DBCC CHECKDB times error          exec sp_dboption @dbname,' single user ', ' false '    

3. Other Common repair commands
DBCC Dbreindex Rebuilding one or more indexes of a table in a specified database
Usage:

DBCC dbreindex (table name, ') fixes all indexes on this table.  

4.DBCC Checkalloc
Checks the consistency of the disk space allocation structure for the specified database

The "Go" attempt failed to extract the logical page () in database 5. This logical page belongs to the allocation unit XXX and not xxx

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.