为什么我的sql server数据库“完全备份”不包含最近的数据?

发布于 2024-09-11 18:54:54 字数 248 浏览 3 评论 0原文

我刚刚在销售人员去吃午饭时迁移了一个 SQL Server 2008 数据库。我进行了完整备份,然后将备份复制到新服务器,并在其中将其恢复到新的 SQL Server 安装。

工作人员吃完午餐回来后告诉我,他们在午餐前进行的一些近期交易不再显示在系统中。经过调查,完整备份似乎不包括执行备份之前添加到数据库的一些最新数据。

我怀疑有一些我没有考虑到的与事务日志相关的事情,但我不是 MSSQL 专家,我不太确定我做错了什么。有人能指出我正确的方向吗?

I just migrated a SQL Server 2008 database while the sales staff went to lunch. I did a full backup and then copied the backup to the new server where I restored it to the new SQL Server installation.

The staff got back from lunch and told me that a few of the recent deals they put in right before lunch were no longer showing up in the system. Upon investigation it seems that the full backup was not including some of the very recent data that was added to the database before the backup was performed.

I suspect there is something I'm not accounting for that relates to the transaction log, but not being a MSSQL specialist, I'm not quite sure what I'm doing wrong. Could someone point me in the right direction?

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

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

发布评论

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

评论(3

半城柳色半声笛 2024-09-18 18:54:54

您是只备份数据库,还是也备份事务日志?我的猜测是您没有备份事务日志,其中将包含尚未刷新到 mdb 文件的最近事务。

Did you back up just the database, or with transaction logs as well? My guess is that you didn't backup transaction logs, which will contain recent transactions not yet flushed down to the mdb file.

温柔戏命师 2024-09-18 18:54:54

数据可能已在开放交易中输入。由于备份必须遵守 ACID 模型,如果在备份开始之前启动了事务并且在备份完成时尚未提交,该事务将在恢复数据库时回滚。

The data may have been entered in an open transaction. Since the backup has to adhere to the ACID model, if a transaction was started before the backup started and was not committed by the time the backup has completed, the transaction will be rolled back upon restoring the database.

夏至、离别 2024-09-18 18:54:54

这就是为什么你在工作日从不做这些事情!下次在周末执行此操作,并通过将数据库置于单用户模式来对用户关闭数据库。如果您没有先将他们锁定,他们可能会在您备份后或备份期间添加数据。

This is why you never do these things during a work day! Next time do this over the weekend and close the database off to users by putting it in single user mode. They could have added the data after your backup or during it if you didn't lock them out first.

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