Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Full back ups and transaction log questions

Author  Topic 

cornall
Posting Yak Master

148 Posts

Posted - 2007-05-10 : 12:02:17
Can I clarify my understanding is correct using a simplified example with regards to transaction logs and full backups :-

1. Full backup (fbk1.dat)
2. Transaction Log (tl1.log)
3. Transaction Log (tl2.log)
4. Transaction Log (tl3.log)
5. Transaction Log (tl4.log)
6. Full backup (fbk2.dat)
7. Transaction Log (tl5.log)
8. Transaction Log (tl6.log)
9. Transaction Log (tl7.log)

On my target database can I apply 1 > 2 > 3 > 4 > 5 > 7 > 8 > 9 without applying the second backup fbk2.dat?

But then if I want to roll back to tl5.log by applying 6 > 7?

nr
SQLTeam MVY

12543 Posts

Posted - 2007-05-10 : 12:16:52
Yes - but you wouldn't unless 6 was lost or corrupt.
You can't roll back. You can apply tr logs in order following a full/diff backup restore but that's all.
You could restore 6 which would overwrite the database then apply 7

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-05-10 : 13:49:16
As Nigel said.

In case it helps:

You can restore a full backup, then optionally a Differential backup that was based on that same Full backup - i.e. no subsequent Full backup was taken before the Differential.

The sub-plot of this is that you can NOT restore a "really-old-Full-backup" and a "Really-recent-Differential"

Separately you can apply all TLog backups, in order, from that point forwards - i.e. All Tlog backups, in order, since the Full backup (or Differential if you've restored one of them). You can optionally use STOPAT to halt restore at a given date/time - so Tlog backups can restore UP TO a given point in time.

The sub-plot on this is that you can restore a really-old-Full-backup, and then ALL subsequent Tlog backups. This is handy if you have a Full backup which is corrupted - but of course if one of the Tlog backups in the chain is corrupted then you cannot restore past that point.

Restoring lots of Tlog backup files takes time ...

Kristen
Go to Top of Page

cornall
Posting Yak Master

148 Posts

Posted - 2007-05-11 : 03:36:16
Thanks for clarifying and all the extra info. Appreciated.

D
Go to Top of Page
   

- Advertisement -