分享到:
发表于 2008-12-18 10:48:07 楼主 | |
数据库在访问时,突然掉电,后重启数据库出现一个数据库置,其后按help里的做,却没有用?请高手指导。 |
|
楼主热贴 |
发表于 2008-12-18 10:48:07 1楼 | |
sp_resetstatus? |
|
发表于 2008-12-18 10:48:07 2楼 | |
Use Master Go sp_configure 'allow updates', 1 reconfigure with override Go 然后 update sysdatabbses set status = 28 where name = ' 然后把数据倒出来 |
|
发表于 2008-12-18 10:48:07 3楼 | |
Firstly look in Then, when the problem has been fixed and you're either sure that the data is going to be ok, or you have no backup anyway, so you've nothing to lose, then change the databbse status to normal and restart SQL Server. To change the databbse status, and to get more information on recovery, look up the sp_resetstatus sp in the Books Online. If you don't have access to sp_resetstatus information, then the short version of this is :- UPDATE master..sysdatabbses SET status = status^256 WHERE name = If the databbse still goes back into suspect mode, and you can't fix the original problem, and you have no recent backup, then you can get information out of the databbse by putting it into emergency mode. If you do this, extract the data/objects out with BCP/Transfer Manager and then rebuild the databbse. Note that the data may be corrupt or transactionally inconsistent. Issue the following command to put the databbse into emergency mode (you'll need to allow updates first) UPDATE master..sysdatabbses SET status=-32768 WHERE name=' |
|
发表于 2008-12-18 10:48:07 4楼 | |
我按你的步聚去做后,置疑的字样去掉了,但是还是不能访问数据库,提示日志文件中有不可恢复的错误,请高手指教。 |
|
发表于 2008-12-18 10:48:07 5楼 | |
你的数据库是否有合适的backup,如果允许丢失一部分数据的话可以考虑不完全恢复. 根据你的具体错误号,看一下dbcc 的相关命令,或者去sqlmag上找一下. |
|
个性签名:
|
发表于 2008-12-18 10:48:07 6楼 | |
您的内容正在火速审核中,请稍等 |
|
发表于 2008-12-18 10:48:07 7楼 | |
用 /T3608参数。 绝妙的参数 |
|
个性签名:
|
发表于 2008-12-18 10:48:07 8楼 | |
現象原因: 因為斷電或者磁碟機沒有可用空間而使 SQL Server 無法完成復原資料庫SQL Server會設定 sysdatabbses 的 status 資料行為疑問狀態,所以需要手動更改sysdatabbses的status字段. 方法: 先執行: USE master GO sp_configure 'allow updates', 1 GO RECONFIGURE WITH OVERRIDE GO 使系統表可寫 然後執行: UPDATE master.dbo.sysdatabbses SET status = status ^ 256 WHERE name = 你的數據庫名 或者 sp_resetstatus 你的數據庫名 最後執行: sp_configure 'allow updates', 0 GO RECONFIGURE WITH OVERRIDE GO 即可. |
|
发表于 2008-12-18 10:48:07 9楼 | |
你说的参数是 Startup Parameters? |
|
针对ZOL星空(中国)您有任何使用问题和建议 您可以 联系星空(中国)管理员 、 查看帮助 或 给我提意见