ؿͷڙzy͑W(wng)վrl(f)F(xin)һ͑SQL Server2005(sh)(j)@ʾ鮐ھW(wng)ϲԃ˺ܶδޏ(f)磺
--O(sh)Ô(sh)(j)oB(ti)
use master
go
sp_configure 'allow updates',1
go
reconfigure with override
go
--O(sh)Ô(sh)(j)oģʽ
update sysdatabases set status=-32768 where dbid=DB_ID('Procurement')
--ؽ(sh)(j)־ļ
dbcc rebuild_log('Procurement','D:\Procurement_log.ldf')
--C(sh)(j)һԣʡԣ
dbcc checkdb('Procurement')
--O(sh)Ô(sh)(j)B(ti)
sp_dboption 'Procurement','dbo use only','false'
--*һ҂ҪEEO(sh)õġSϵy(tng)Ŀֱġһ헻֏(f)
sp_configure 'allow updates',0
go
reconfigure with override
go
Y(ji)l(f)F(xin)oЧϷֻʹSQL Server2000(jng)^҂һо͜yԇyKOQֻҪڔ(sh)(j)ԃЈ(zh)4дaQ
ALTER DATABASE Ĕ(sh)(j) SET EMERGRNCY
ALTER DATABASE Ĕ(sh)(j) SET SINGLE_USER
DBCC CheckDB (Ĕ(sh)(j),REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE Ĕ(sh)(j) SET MULTI_USER