--下面语句中的ABCD就是你要修改的数据库名称USE MASTER GOSP_CONFIGURE 'ALLOW UPDATES',1 GORECONFIGURE WITH OVERRIDE GOupdate sysdatabases set status =32768 where name='ABCD' Gosp_dboption 'ABCD', 'single user', 'true' GoDBCC CHECKDB('ABCD') Goupdate sysdatabases set status =28 where name='ABCD' Gosp_configure 'allow updates', 0 reconfigure with override Go sp_dboption 'ABCD', 'single user', 'false' Go 84339879 jiang
GOSP_CONFIGURE 'ALLOW UPDATES',1
GORECONFIGURE WITH OVERRIDE
GOupdate sysdatabases set status =32768 where name='ABCD'
Gosp_dboption 'ABCD', 'single user', 'true'
GoDBCC CHECKDB('ABCD')
Goupdate sysdatabases set status =28 where name='ABCD'
Gosp_configure 'allow updates', 0 reconfigure with override
Go sp_dboption 'ABCD', 'single user', 'false'
Go
84339879 jiang
http://www.programmerstudy.com/database/sqlserver/20084/103.html