SQL- SQL SERVER Recover Database from Suspect Status

At time database got suspect after unexpected shut-down, you may recover it by running below command on master database


DECLARE  @dbname  varchar (255)

SELECT @dbname='YOURDBNAME'


EXEC sp_resetstatus @dbname
DBCC DBRECOVER (@dbname)