- Write the following SQL Query,
- ALTER DATABASE [SQL DB Name] SET EMERGENCY
- Refresh the databases to make sure SQL DB Name is in Emergency
- Then execute the following three SQL Queries one after the other,
- Alter Database [SQL DB Name] SET SINGLE_USER
- DBCC CHECKDB([SQL DB Name],REPAIR_ALLOW_DATA_LOSS)WITH ALL_ERRORMSGS;
- ALTER DATABASE [SQL DB Name] SET MULTI_USER