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 2008 Forums
 SQL Server Administration (2008)
 Restore point in time from Log FILE

Author  Topic 

denis_the_thief
Aged Yak Warrior

596 Posts

Posted - 2012-11-11 : 10:48:11
Here's a hypothetical situation:
- our Log File is on E Drive
- our Database File is on D Drive
- We have a Backup from last night on G Drive
- During the day our D Drive dies and we can't get the Database File Back
- We have no Transaction Log backups


Can the Database be restored to a point in time using our backup and our Log File?

Hommer
Aged Yak Warrior

808 Posts

Posted - 2012-11-12 : 10:28:52
Try to perform a tail-log backup first.
Go to Top of Page

denis_the_thief
Aged Yak Warrior

596 Posts

Posted - 2012-11-12 : 10:49:21
quote:
Originally posted by Hommer

Try to perform a tail-log backup first.



Thanks. In this case we can't since the D Drive which has the Database File is dead.

Anyways, this is only a hypothetical situation.

I was just wondering if the Transaction Log file (rather than Log backup) would be of any use if you lose your Database.
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2012-11-13 : 14:40:15
No - you cannot restore to a point in time without available transaction log backups. The best you can do is restore to the latest backup...

Now, if the database is in full recovery model - and you are able to perform a tail-log backup (database does not need to be available for this) then you could restore to a point in time.
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2012-11-13 : 15:07:09
Yes, like Hommer and Jeff said, perform a Tail of the log backup.

-Chad
Go to Top of Page

denis_the_thief
Aged Yak Warrior

596 Posts

Posted - 2012-11-13 : 15:20:37
quote:
Originally posted by jeffw8713

No - you cannot restore to a point in time without available transaction log backups. The best you can do is restore to the latest backup...

Now, if the database is in full recovery model - and you are able to perform a tail-log backup (database does not need to be available for this) then you could restore to a point in time.



I appreciate that. I am very surprised. I did not think I could do anything if the Database is not available. I am how curious how I could execute any command if the Database is not available. Maybe I worded the question poorly. Let us say all the Databases are unavailable (i.e. if all were on D Drive as well) or Master is unavailable. And lets say (I forgot to mention) the Database is in Recovery mode. Any idea or any link would be helpful.

Is it that I could restore my back up and then use my Log File (I have no Log backup) to then somehow do a Tail Backup?
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2012-11-13 : 15:35:01
http://sqlskills.com/BLOGS/PAUL/post/Disaster-recovery-101-backing-up-the-tail-of-the-log.aspx

-Chad
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-11-13 : 16:02:00
Paul's wife, Kimberly, illustrated the database being available when the drive it's on isn't available. This was at PASS 2011. It's because it's running in memory. But try a checkpoint, and it'll finally fail.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

denis_the_thief
Aged Yak Warrior

596 Posts

Posted - 2012-11-17 : 10:14:36
quote:
Originally posted by tkizer

Paul's wife, Kimberly, illustrated the database being available when the drive it's on isn't available. This was at PASS 2011. It's because it's running in memory.



How could the entire Database be in memory? I realize SQL Server keeps what it feels like in the cache. But everything running in memory?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-11-18 : 21:26:59
Well it depends on how much memory you have and what's been read into cache.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -