简体   繁体   English

事务日志备份中的第一个LSN和最后一个LSN相同

[英]First LSN and last LSN the same in transaction log backups

When restoring SQL Server Transaction Log files, I have noticed a number of log backups taken over night that have the same First and Last LSN. 还原SQL Server事务日志文件时,我注意到在整个晚上进行的许多日志备份,它们具有相同的“第一”和“最后” LSN。

Do these files have to be restored as part of the chain or can they be skipped? 这些文件是否必须作为链的一部分进行还原,还是可以跳过?

The transaction log is a serial record of all the transactions that have been performed against the database since the transaction log was last backed up. 事务日志是自上次备份事务日志以来已针对数据库执行的所有事务的串行记录。 So, if there were no changes in the database between transaction log backups the First and the Last LSN will be the same. 因此,如果事务日志备份之间的数据库没有变化,则第一个和最后一个LSN将相同。

In short: yes, they can be skipped. 简而言之:是的,可以跳过它们。

The only-slightly-longer answer: the reason that the first and last LSNs are the same for those backups is because nothing happened in that time interval to incite change in the log. 唯一稍长的答案是:这些备份的第一个和最后一个LSN相同的原因是,在该时间间隔内没有任何事情引起日志更改。 That said, they'll also take no time to restore, so you're probably better off just restoring them than trying to account for this edge case if and when you need to restore them. 话虽如此,它们也将花费很少的时间进行还原,因此与在需要还原它们的情况下尝试解决这种极端情况相比,仅还原它们可能会更好。 Remember - the best plan in a crisis situation is often the simplest. 请记住-在危机情况下最好的计划通常是最简单的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM