Friday, March 23, 2012

restore database from ldf file only

Hello guys,
is it possible to restore an SQL server database from the .ldf file only?
The last operation is a script execution that have drop and create all the tables.
have you some idea?
Thanks to allldf typically contains only logs, which record changes to the database. Any restore must begin by reloading a backup, followed by whatever logs are required/desired.|||thanks for the fast reply.

I have an old backup that is from december, and the log file that is till now.

Do I have some chance?|||Yes, if you have continuous logs.

You can certainly restore the backup from December. If your logs are continuous since then, then you can do a point in time restore. Your best bet is to do it using Enterprise Manager, assuming that it has kept a record of backups and log dumps.|||First check if your database has been in FULL recovery mode. If it is set to SIMPLE than you don't stand a chance.

The simplist way to check this is in EM. Look at the properties of the database, tab "options".|||First check if your database has been in FULL recovery mode. If it is set to SIMPLE than you don't stand a chance.

The simplist way to check this is in EM. Look at the properties of the database, tab "options".

I could wrong but I do not think you can even back up the log in SIMPLE.|||Nope you can't. And even if you could there wouldn't be anything of use to you in there.

But it sounds like they didn't backup logs, there's only talk about a full backup. So if there are no log backups and the database is in FULL recovery mode (that ldf file could be huge!) he could try a restore with a roll forward (I think that's the theory, never done it before).

Who is it that has that nice tag line: "did you hug your backup today?" :D

Lex

No comments:

Post a Comment