这样作就OK了
master database to allow updatesUSE masterGOsp_configure ''allow updates'', 1GORECONFIGURE WITH OVERRIDEGO --Run the following scriptUPDATE master..sysdatabases SET status = status ^ 256 WHERE name = ''Database_Name'' --Run the following scriptexec SP_resetstatus Database_Name --stop and start the MSDTC at this stage --After the procedure is created, immediately disable updates to the system tables:exec sp_configure ''allow updates'', 0GORECONFIGURE WITH OVERRIDEGO=====================================
从上面可以看出,处理置疑的基本步骤还是我那篇文章中说的(注意我使用的字体颜色):执行 sp_configure 以允许对系统表进行更新,然后用 RECONFIGURE WITH OVERRIDE 语句强制实施该配置;数据库重置紧急模式;执行sp_resetstatus关闭数据库的置疑标志,但是原封不动地保持数据库的其它选项(只有系统管理员才能执行)。执行该过程后,立即重启 SQL Server服务;执行 sp_configure 以禁止对系统表进行更新,然后用 RECONFIGURE WITH OVERRIDE 语句强制实施该配置。
master database to allow updatesUSE masterGOsp_configure ''allow updates'', 1GORECONFIGURE WITH OVERRIDEGO --Run the following scriptUPDATE master..sysdatabases SET status = status ^ 256 WHERE name = ''Database_Name'' --Run the following scriptexec SP_resetstatus Database_Name --stop and start the MSDTC at this stage --After the procedure is created, immediately disable updates to the system tables:exec sp_configure ''allow updates'', 0GORECONFIGURE WITH OVERRIDEGO=====================================
从上面可以看出,处理置疑的基本步骤还是我那篇文章中说的(注意我使用的字体颜色):执行 sp_configure 以允许对系统表进行更新,然后用 RECONFIGURE WITH OVERRIDE 语句强制实施该配置;数据库重置紧急模式;执行sp_resetstatus关闭数据库的置疑标志,但是原封不动地保持数据库的其它选项(只有系统管理员才能执行)。执行该过程后,立即重启 SQL Server服务;执行 sp_configure 以禁止对系统表进行更新,然后用 RECONFIGURE WITH OVERRIDE 语句强制实施该配置。
数据库的脚本创建一个新的数据库,并将数据导进去就行了.USE MASTER
GOSP_CONFIGURE 'ALLOW UPDATES',1 RECONFIGURE WITH OVERRIDE
GOUPDATE SYSDATABASES SET STATUS =32768 WHERE NAME='置疑的数据库名'
Gosp_dboption '置疑的数据库名', 'single user', 'true'
GoDBCC CHECKDB('置疑的数据库名')
Goupdate sysdatabases set status =28 where name='置疑的数据库名'
Gosp_configure 'allow updates', 0 reconfigure with override
Go sp_dboption '置疑的数据库名', 'single user', 'false'
Go