Files
sql-scripts/EXPLOIT - suspect database.sql
2023-04-26 16:04:26 +02:00

12 lines
426 B
SQL

--step 1, go in emergency mode
ALTER database [ActivePos_write] set SINGLE_USER
Alter database [ActivePos_write] SET EMERGENCY
--step 2, do a checkdb
DBCC CHECKDB ('ActivePos_write') WITH NO_INFOMSGS, ALL_ERRORMSGS
--if no errors reported or index corruption, do a repair with data loss
DBCC CHECKDB ('ActivePos_write', REPAIR_ALLOW_DATA_LOSS)
--set the db back in multi user
ALTER database [ActivePos_write] set multi_user