The other day I received a call from a developer telling me that they could not access a particular database in one of our lower environments. After a bit of investigation, I found the database causing the problem, it was in ‘Suspect’ Mode. Here is what I did to correct the issue.
ALTER DATABASE DatabaseName SET EMERGENCY
ALTER DATABASE DatabaseName SET SINGLE_USER
DBCC CheckDB (DatabaseName , REPAIR)
ALTER DATABASE DatabaseName SET MULTI_USER
Presto, the database was now fully functional and accessible. A very quick fix, to what had the potential to really ruining my Tuesday morning.