Asta face procedura sp_resetstatus...Eu am "iesit la liman" intr-o situatie in care clientul nu avea backup (si nici nu s-a invatat minte...) cam asa:
ALTER DATABASE db_name SET EMERGENCY;
EXEC sp_resetstatus 'db_name'
EXEC sp_dboption 'db_name',
'single_user', 'true';
DBCC CHECKDB ('db_name', REPAIR_ALLOW_DATA_LOSS);
EXEC sp_dboption 'db_name',
'single_user', 'false';
ALTER DATABASE db_name SET ONLINE;
* Cred ca sp_resetstatus poate "lipsi" (e vorba de SQL 2005) - dar
atunci nu mi-a "ars" sa testez...in fine...lenea e mare...
. BOL
spune:
This feature will be removed in a future version of Microsoft SQL Server. Avoid
using this feature in new development work, and plan to modify applications that
currently use this feature. Use ALTER
DATABASE instead.
La fel pt. sp_dboption...