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

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

问题描述

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?

解决方案

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

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. Select to restore the database in the database context menu

  2. Leave Database as Source. Click Timeline

  1. Select Specific date and time. If you drag the time pointer, you'll able to see how long back your transaction log goes. Note that bright green shows that the transactions have never been backed up

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天全站免登陆