You are here: Re: Restore LDF file after restoring backups in SQL Server 2005? « MsSQL Server « IT news, forums, messages
Re: Restore LDF file after restoring backups in SQL Server 2005?

Posted by l0b0 on 09/04/07 13:55

On Aug 22, 12:38 pm, Erland Sommarskog <esq...@sommarskog.se> wrote:
> l0b0 (victor.engm...@gmail.com) writes:
> > I'm working on a restore procedure for the case where all MDF files
> > are missing, but the LDF files are all intact. A full backup is done
> > every 24 hours, and a log backup is done every 3 hours. After
> > restoring the last full + log backups, is it at all possible to use
> > the LDF files to recover data from that point up to a newer point in
> > time?
>
> At that point it may be a little late. Say that disaster strikes and
> your MDF file is dead. At this point you can perform BACKUP LOG WITH
> NO_TRUNCATE to back up the log. Then you restore and apply all logs
> including this one.

Thanks! I ended up doing the following:
1. BACKUP LOG database TO DISK = 'C:\database.bak' WITH NO_TRUNCATE;
2. Restore full + log backups without recovery
3. RESTORE LOG database FROM DISK='C:\database.bak' WITH MOVE
'database_log' TO 'L:\database_log.LDF', RECOVERY;

It works fine.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация