SQL Server 2005 数据库“恢复中”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1464750/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
SQL Server 2005 Database 'In Recovery'
提问by EightyOne Unite
I restored a 35Gb database on my dev machine yesterday and it was all going fine until this morning when my client app couldn't connect. So I opened SQL Management Studio to find the database 'In Recovery'.
昨天我在我的开发机器上恢复了一个 35Gb 的数据库,直到今天早上我的客户端应用程序无法连接时,一切都很好。所以我打开 SQL Management Studio 来找到数据库“恢复中”。
I don't know a huge amount about this other than it is usually something to do with uncommitted transactions. Now since i know there aren't anyuncommitted transactions it must be something else. So first off, I'd like to know under what conditions this can happen. Secondly, while this is going on I can't work so if there are any ways of either stopping the recovery, speeding it up or at least finding roughly how long it's gonna be that would help.
除了它通常与未提交的事务有关之外,我对此知之甚少。现在因为我知道没有任何未提交的交易,所以它一定是别的东西。首先,我想知道在什么条件下会发生这种情况。其次,当这种情况发生时,我无法工作,所以如果有任何方法可以阻止恢复、加速恢复或至少确定大概需要多长时间会有所帮助。
回答by
Do not shut down SQL while recovery is in progress. Let it finish. Check the error logs. If it doesn't finish, restore from backup.
不要在恢复过程中关闭 SQL。让它完成。检查错误日志。如果没有完成,请从备份中恢复。
回答by Julian Jelfs
You can find out how long it's going to take by looking in the event viewer. In the Application section on the Windows Logs you should get information messages from MSSQLSERVER with EventID 3450 telling you what it's up to. Something like:
您可以通过查看事件查看器来了解需要多长时间。在 Windows 日志的应用程序部分,您应该从 MSSQLSERVER 获得事件 ID 3450 的信息消息,告诉您它在做什么。就像是:
Recovery of database 'XYZ' is 10% complete (approximately 123456 seconds remain) etc etc
数据库“XYZ”的恢复已完成 10%(剩余大约 123456 秒)等
I'm afraid I don't know how to stop it (yet).
恐怕我不知道如何阻止它(还)。