Back up the database, and then use the following method:
Copy Code code as follows:
Use MASTER
Go
sp_configure ' ALLOW UPDATES ', 1 reconfigure with OVERRIDE
Go
ALTER DATABASE database_name SET Emergency
Go
sp_dboption ' database_name ', ' Single user ', ' true '
Go
DBCC CHECKDB (' database_name ', ' repair_allow_data_loss ')
Go
ALTER DATABASE database_name SET ONLINE
Go
sp_configure ' allow updates ', 0 reconfigure with override
Go
sp_dboption ' database_name ', ' Single user ', ' false '
Go
Start by creating a new database with the same name, then stopping the SQL Server service, overwriting the new database file with the original database data file, and restarting the SQL Server service. Open Enterprise Manager, which displays "suspect" and executes the above statement in Query Analyzer. If the database itself is still problematic after execution, it still shows "doubt". Now create a new database, run the DTS Export Wizard, import the data from the problematic database into the new database, open the new database, and retrieve all the data!