查看SQL Server 2008中的所有事务日志 [英] View all transaction logs in SQL Server 2008

查看:457
本文介绍了查看SQL Server 2008中的所有事务日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是这样的:

t0: Insert is made into my database
t1: Delete is executed
t2: Full backup is made
t3: Transaction log backup is made

我如何在t3(现在)之后恢复已删除的记录?我希望数据库处于介于t0和t1之间的状态.日志级别为满".

How can i recover the deleted record after t3 (which is now)? I want the database in a state between t0 and t1. The log level was Full.

我已经运行过DBCC LOG(DB-Name,3),但是日志似乎被截断了.虽然必须有数千个,但是只有10个.

I have already run DBCC LOG(DB-Name, 3), but the log seems to be truncated. There are only 10 items although there must be thousands.

推荐答案

要重播日志,请始终从完整日志开始,应用差异,然后再备份日志.时间线始终从完整备份开始,而不是向后备份.因此,要进入t0之后的状态(即恢复已删除的记录),请从完全备份开始,该备份是在t0之前进行的,然后在t0停止应用日志备份.

To replay log you always start from a full log, apply the differentials and then the log backups. The time line is always forward from the full backup, never backwards. So to get to the state after t0 (ie. recover the deleted record) you start with a full backup that was taken before t0 and then apply the log backups with stop at t0.

这篇关于查看SQL Server 2008中的所有事务日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆