SQL 2005 AND 2008
ALTER DATABASE yourDBname
SET EMERGENCY DBCC checkdb('yourDBname')
ALTER DATABASE yourDBname
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB ('yourDBname', REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE yourDBname
SET MULTI_USER
SQL 2000
SP_DBOPTION 'yourDBName', 'SINGLE USER', 'TRUE'
DBCC CHECKDB ('yourDBName', REPAIR_ALLOW_DATA_LOSS)
SP_DBOPTION 'yourDBname', 'SINGLE USER', 'FALSE'
0 comments:
Post a Comment