EXEC sp_resetstatus [AMDB]
ALTER DATABASE [AMDB] SET EMERGENCY
DBCC checkdb([AMDB])
ALTER DATABASE [AMDB] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB ([AMDB], REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE [AMDB] SET MULTI_USER
*Note that in this example the database name is AMDB. Make sure you use the actual database name. Our default database names have changed over the years so it is always wise to log into SQL Server via Management Studio to confirm the name of the database.