The database can be used, can be backed up, but restored to the back of the Times wrong, using sp_attach_db to two physicalThe same error is reported when the file is connected:
Server: Msg 605, Level 21, State 1, line 1
Trying to get fromThe logical page extracted from the database ' ufdata_001_2003 ' (1:10,720) belongs to the object ' 0 ', not the object ' syscolumns '.
Connection interrupted
Note: severity level 21: In the Database (dbid) sessionSQL Server Critical Error
These messages indicate that an issue has been encountered that affects all processes in the current database, but the database itself is less likely to be corrupted
Error Analysis
Data recovery is possible for reported errors
Errors May syscolumns thisThe system table Storage page has been compromised, and the key to recovery is to fix the table correctly
Recovery Step 1-Connect to database
First,Create a new database with the same name as establish accounts
Second,Stop the SQL Server service,Delete two files from the new database and copy the Ufdata.mdf from the backup to the appropriate folder
Third,Start the SQL Server service,Run SQL scripts to set up the database for state of emergency (emergency mode)
Four,Restart the SQL Server service, rebuild the LDF file
Connection Successful!
Five,Run SQL scripts to set up the database as a state of emergency
sp_configure ' allow updates ', 1--Specifies that system tables can be updated directly
Go
Reconfigure with override-if the configuration does not need to restart the service, the configuration value is directly
Go--Change the running value
Use master
Go
Update sysdatabases SET status = 32768--This parameter is reset to a state of emergency
where name = ' ufdata_003_2003 '
Go
sp_configure ' allow updates ', 0
Go
Reconfigure with override
Recovery Step 1-Connect database Script 2
Rebuilding the LDF file
DBCC REBUILD_LOG (' ufdata_001_2003 ', ' E:\U8SOFT\ZT001\2003\ufdata.ldf ')
Note: The SQL Server service must be restarted before
Recovery Step 2-Repair system tables
First, determine the error table syscolumns
Run SELECT * from syscolumns
ERROR---Identify the source of the mistake
Second, run DBCC repair
Recovery Step 2-Repair system tables-Script 1
sp_dboption ' ufdata_002_2003 ', ' single USER ', TRUE
Go
DBCC checktable (' syscolumns ', repair_rebuild)
Go
sp_dboption ' ufdata_002_2003 ', ' single USER ', FALSE
Go
Partial error message:
CheckTable found 0 allocation errors and 3 conformance errors (in table ' syscolumns ', the table has an object ID of 3).
Repair_allow_data_loss is the lowest level of repair (for errors found by DBCC checktable (UFDATA_002_2003.dbo.syscolumns repair_rebuild)).
Recovery Step 2-Repair system tables-Script 2
A higher-level way to fix sp_dboption
' ufdata_003_2003 ', ' single USER ', TRUE
Go
DBCC checktable (' syscolumns ', Repair_allow_data_loss)
Go
sp_dboption ' ufdata_003_2003 ', ' single USER ', FALSE
Go
Running results show that the error has been repaired successfully!!!
The logical page (1:10,720) attempting to extract from the database ' ufdata_001_2003 ' belongs to the object ' 0 ', not the object ' syscolumns '