SQL Server 2005 执行“恢复” 在使用“NORECOVERY”恢复的数据库上

发布于 2024-07-26 17:51:39 字数 231 浏览 3 评论 0原文

我有完整的每周备份、每日差异备份和每小时事务日志备份。

为了恢复数据库,我先恢复完整备份,然后恢复最后一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

守护在此方 2024-08-02 17:51:39

好的,答案相当简单。 您只需运行该命令即可。

RESTORE DATABASE [MyDatabase] WITH RECOVERY

我什至没有想到您可以运行 RESTORE DATABASE 命令而不指定要从中恢复的备份。

Ok, so the answer is fairly simple. You can simply run the command.

RESTORE DATABASE [MyDatabase] WITH RECOVERY

It didn't even occur to me that you can run the RESTORE DATABASE command without specifying a backup to restore from.

往事风中埋 2024-08-02 17:51:39

试试这个(来自 SQL2000 帮助):
通过恢复恢复数据库 dbname

Try this (from SQL2000 help):
RESTORE DATABASE dbname WITH RECOVERY

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文