--下面语句中的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
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
试试这个:
restore dabata YourDB with recovery
使数据库从恢复状态转到正常状态,然后在进行其他操作
restore database YourDB with recovery