SQL Server 恢复和批量恢复模式混淆

发布于 2024-07-14 12:16:46 字数 401 浏览 8 评论 0原文

我对 SQL Server 恢复和批量恢复模式有两个困惑。

  1. 恢复过程本身是否会生成事务日志(这里我的意思是恢复过程生成的日志——如果有的话,而不是正常数据库DML/DDL操作生成的日志)? 为什么?

  2. 下,对A或B的理解是否正确(如果都不正确,请帮忙指正,这是我的两种不同的理解,导致我很困惑)

A.对产品数据库的正常DML/DLL批量操作(不是恢复操作 ) )将生成最少量的日志,由于日志很少,利用日志的恢复过程无法恢复批量操作中间的任何点; B、对产品数据库正常的DML/DLL批量操作仍会产生正常的大量日志(与非批量日志恢复模式相同),但恢复过程会将事务日志中的批量操作作为一个单元进行恢复,从而产生恢复过程本身的最小日志;

问候, 乔治

I have 2 confusions about SQL Server recovery and bulk recovery mode.

  1. whether recovery process itself will generate transaction log (here what I mean the logs are the logs generated by recovery process -- if any, and not generated by normal database DML/DDL operations)? Why?

  2. in the bulk recovery mode, whether the understanding of A or B is correct (if neither is corect, please help to correct me, here are my 2 different understandings which causes me confused)

A. the normal DML/DLL bulk operation on product database (not the recovery operation) will generate minimal amount of logs, since logs are minimal, the recovery process which utilizes log, can not recover any point in the middle of bulk operations;
B. the normal DML/DLL bulk operation on product database will still generate normal large amount of logs (the same as non-bulk log recovery mode), but recovery process will treat bulk operation in transaction log as a unit to recover, which generates minimal logs for recovery process itself;

regards,
George

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

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

发布评论

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

评论(1

孤者何惧 2024-07-21 12:16:47

请阅读以下两篇文章:

http://technet.microsoft.com /en-us/magazine/2009.02.logging.aspx

http://www.simple-talk.com/sql/backup-and-recovery/simple-talk-sql-server-backup-crib-sheet/

恢复过程不会创建日志。 日志是执行时间点恢复过程所需的内容(以及完整数据库备份,可能还有差异备份)。

具有“批量记录”恢复功能的数据库
其功能将非常类似于“完整”的
除了只有体积的影响
操作记录在
备份,而不是事务
涉及。 这些批量操作
包括 BCP、某些数据
转型服务 (DTS)
操作、图像和文本
操作,并选择进入。 经过
使用“批量记录”恢复模型,
批量操作未记录并且
因此要快得多。 时间点
如果出现以下情况之一,则无法恢复
这些批量操作已经发生
因为如果日志备份涵盖任何
批量操作、日志备份
包含日志记录和数据
批量更改的页面
操作,这适用于所有
更改到日志
已备份。

Please read the following two articles:

http://technet.microsoft.com/en-us/magazine/2009.02.logging.aspx

http://www.simple-talk.com/sql/backup-and-recovery/simple-talk-sql-server-backup-crib-sheet/

A Recovery Process does NOT create Logs. Logs are what are required in order to perform a point in time recovery process (along with a full database backup, and possibly differential backups).

A database with 'bulk-logged' recovery
will function much like a 'full' one
except that only the effect of bulk
operations are recorded in the
backups, rather than the transactions
involved. These bulk operations
include BCP, certain Data
Transformation Services (DTS)
operations, image and text
manipulations, and SELECT INTO. By
using a 'bulk-logged' recovery model,
the bulk operations are unlogged and
therefore much quicker. Point-in-time
recovery is not possible if one of
these bulk operations have taken place
because if a log backup covers any
bulk operations, the log backup
contains both log records and the data
pages that were changed by bulk
operations, and this applies to all
changes up to the point that the log
was backed up.

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