从损坏的 SQL Server 数据库中恢复事务日志

发布于 2024-08-25 19:38:45 字数 289 浏览 7 评论 0原文

我们有一个每周以简单模式备份的数据库。昨天,我们有一个 crc 错误损坏了 mdf 文件,我们无法保存它。我恢复了上周的备份,但现在从备份时间到恢复时间有一个差距。由于我拥有该数据库中的 ldf 文件,是否有任何方法可以“重播”该事务日志以填补空白?

我尝试将 ldf 文件重新附加到恢复的 mdf 文件,但 SQL Server 不允许我这样做。 (当我重新附加数据库时,它只是创建一个具有不同名称的新 ldf 文件。)

任何想法都会有帮助。这是会丢失大量数据,虽然它不是关键数据,但我想找回它(以及学习以及学习如何做到这一点。)

We have a database that is backed up weekly in simple mode. Yesterday, we had a crc error corrupt the mdf file and we were unable to save it. I restored the backup from last week, but now we have a gap from the time of the backup to the time of the restore. Since I have the ldf file from that database, is there any way to "replay" that transaction log to fill in the gap?

I have tried reattaching the ldf file to the recovered mdf file, but SQL Server will not allow me to do that. (It just creates a new ldf file with a different name when I reattach the database.)

Any ideas would help. This is a lot of data to lose and although it is not critical data, I'd like to get it back (as well as learn as well as learn how to do it.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

微暖i 2024-09-01 19:38:45

如果您按照 MSDN -如何:还原到某个时间点 ( SQL Server Management Studio) 你应该很好。我不会在这里复制它们,因为它们很长。还有MSDN - 如何:还原事务日志备份

If you follow the instructions from MSDN -How to: Restore to a Point in Time (SQL Server Management Studio) you should be good. I will not reproduce them here as they are quite long. There is also MSDN - How to: Restore a Transaction Log Backup

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