如何执行SQL从事务日志回滚 [英] How to perform SQL Roll back from transaction logs

查看:289
本文介绍了如何执行SQL从事务日志回滚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有可以追溯到6个月的交易日志文件.我需要从数据库回滚5/20/2013之后发生的所有事情.有人可以启发我如何做吗?

I have transaction log file that goes back 6 months. I need to roll back everything that happened after 5/20/2013 from a database. Can anyone please enlighten me on how to do this?

推荐答案

首先,复制数据库MDF和LDF文件.比后悔更安全

First of all, copy the database MDF and LDF files. Better safe than sorry

可以将数据库还原到 SQL Server 2008R2 .无需先创建事务日志备份,它会由SQL Server自动完成.您可以在此处找到有关日志尾备份的更多信息:尾日志备份

The database can be restored to a point in time in SQL Server 2008R2, also. There's no need to create a transaction log backup first, it'll be done automatically by SQL Server. You can find more about the log-tail backup here: Tail-Log Backups

  1. 在数据库上下文菜单中选择还原数据库

  1. Select to restore the database in the database context menu

将数据库保留为源.点击时间轴

Leave Database as Source. Click Timeline

  1. 选择特定日期和时间.如果您拖动时间指针,您将能够看到事务日志返回多长时间了.请注意,亮绿色表示从未备份过交易

完成所有操作后,安排事务日志备份.在完全恢复模式下建立数据库是永远没有必要的,永远不要备份在线事务日志

After all is done, schedule transaction log backups. There's no point to have a database in Full recovery model and never backup the online transaction log

这篇关于如何执行SQL从事务日志回滚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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