SP_CONFIGURE 'ALLOW UPDATES',1 RECONFIGURE WITH OVERRIDE
ALTER DATABASE EMSXDB SET EMERGENCY
sp_dboption 'EMSXDB', 'single user', 'true'
DBCC CHECKDB('EMSXDB','REPAIR_ALLOW_DATA_LOSS')
ALTER DATABASE EMSXDB SET ONLINE
sp_configure 'allow updates', 0 reconfigure with override
sp_dboption 'EMSXDB', 'single user', 'false'