Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to perform SQL Roll back from transaction logs

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?

like image 983
torres Avatar asked Jun 05 '13 16:06

torres


1 Answers

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 enter image description here

  2. Leave Database as Source. Click Timeline

enter image description here

  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

enter image description here

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

like image 83
Milena Petrovic Avatar answered Sep 21 '22 12:09

Milena Petrovic