1,方法一
ALTER DATABASE [DemoSuspect] SET EMERGENCY;
GO
ALTER DATABASE [DemoSuspect] SET SINGLE_USER;
GO
DBCC CHECKDB (N'DemoSuspect', REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS, ALL_ERRORMSGS;
GO
2,方法二
When DBCC CHECKDB detects a corruption error, a dump file (SQLDUMPnnnn.txt) is created in the SQL Server LOG directory (Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG). The dump file contains the results of the DBCC CHECKDB command and additional diagnostic output. You could check it for more error information. If the error cannot be fixed and restoring from a backup is not possible, the last option is to rebuild your log file for the corrupted database. Here is the syntax:
ALTER database YOUR_DB REBUILD LOG on(
NAME = 'YOUR_DB_log',
FILENAME = 'F:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\YOUR_DB_newLog
)
Note:
The Command is an undocumented and unsupported command that can be used in
emergency situations where the database is offline because of some catastrophic
problem with the transaction log. It is designed to destroy the entire contents of
the current transaction log, rebuild a new one, and allow the user to bring the
database back online. However, this may result in more data lost than if the last
known, good backup was restored.
If the log is rebuild successfully, then run the DBCC CheckDB command and create a backup for the database.
Last, we strongly recommend you perform backup and restore strategies in SQL Server. For more information, please refer to http://technet.microsoft.com/en-us/library/ms191239(SQL.90).aspx