Recover SQL Server Database from Suspect Mode

To recover database from suspect mode in SQL Server 2005 / 2008 use this script in MS SQL Server management Studio:\r\n\r\nEXEC sp_resetstatus ‘yourDBname’;\r\nALTER DATABASE yourDBname SET EMERGENCY\r\nDBCC checkdb(‘yourDBname’)\r\nALTER DATABASE yourDBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE\r\nDBCC CheckDB (‘yourDBname’, REPAIR_ALLOW_DATA_LOSS)\r\nALTER DATABASE yourDBname SET MULTI_USER\r\n\r\nNote: change ‘yourDBname’ with database name you want to recover from suspect mode.