EXEC sp_resetstatus DataBaseName;
ALTER DATABASE DataBaseName SET EMERGENCY
DBCC checkdb(DataBaseName)
ALTER DATABASE DataBaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB (DataBaseName, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE DataBaseName SET MULTI_USER
ALTER DATABASE DataBaseName SET EMERGENCY
DBCC checkdb(DataBaseName)
ALTER DATABASE DataBaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB (DataBaseName, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE DataBaseName SET MULTI_USER