7

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?

Vojtěch Dohnal
  • 7,867
  • 3
  • 43
  • 105
torres
  • 1,283
  • 8
  • 21
  • 30
  • did you try to read [documentation](http://msdn.microsoft.com/en-us/library/ms179451.aspx)? – mvp Jun 05 '13 at 16:41
  • @mvp: Let me read the link you provided. It says for SQL 2012. Also, I asked the DBA and he said the link is good where a backup is performed on the log file (SQL way). This is raw log files that never got truncated due to full recovery mode. How about we start backup on this log file so it can be roll back? Would that work? – torres Jun 05 '13 at 16:46

1 Answers1

19

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

Milena Petrovic
  • 2,651
  • 21
  • 18