klaushaidinger.com

Icon

Restore a SQL Server suspect Database

Execute the following script. Use at your own risk!

USE master;
EXEC sp_resetstatus ‚yourdatabase‘;
ALTER DATABASE yourdatabase SET EMERGENCY
DBCC checkdb(‚yourdatabase‘)
ALTER DATABASE yourdatabase SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB (‚yourdatabase‘, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE yourdatabase SET MULTI_USER