Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

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.

Comments are closed.