SQL Server 2005 执行“恢复” 在使用“NORECOVERY”恢复的数据库上
我有完整的每周备份、每日差异备份和每小时事务日志备份。
为了恢复数据库,我先恢复完整备份,然后恢复最后一个 diff 备份,然后恢复在除最后一个恢复之外的所有恢复中指定 NORECOVERY 的所有事务日志备份。
我的问题是。 如果我不小心恢复了设置了 NORECOVERY 标志的最后一个事务日志,此时是否可以运行命令来“恢复”数据库?
我正在使用 SQL Server 2005。
I have full weekly backups, daily differential backups and hourly transaction log backups.
To restore the database, I restore the full backup, then the last dif backup then all the transaction log backups specifying NORECOVERY on all the restores except the last one.
My question is. If I accidently restore my last transaction log with the NORECOVERY flag set, is there a command I can run to "RECOVER" the database at this point?
I'm using SQL Server 2005.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的,答案相当简单。 您只需运行该命令即可。
我什至没有想到您可以运行 RESTORE DATABASE 命令而不指定要从中恢复的备份。
Ok, so the answer is fairly simple. You can simply run the command.
It didn't even occur to me that you can run the RESTORE DATABASE command without specifying a backup to restore from.
试试这个(来自 SQL2000 帮助):
通过恢复恢复数据库 dbname
Try this (from SQL2000 help):
RESTORE DATABASE dbname WITH RECOVERY