2

First of all, i know how stupid it is not to have a any backup. I can't help it, but i have to (try) to solve it.

I have a transaction log (LDF) file from a SQL Server 2000 database that contains all transactions since the creation of the database. No truncation has been done. The MDF file is gone. Probably because of some disk failure. There is no backup. Not from the original database and not from the transaction log.

I have tried to link the transaction log to a new clean database. But (ofcourse) that failed because SQL Server checks the identity of both files. I have read about software that can read the transaction log. ApexSQL seems to do that. I tried to install the trial version but it gives weird errors when trying to start the program.

Anyone knows a solution for me? It may contain third party software, but i prefer a clean SQL Server solution.

1
  • i'm curious as to how you came to have an ldf file without an mdf file. As far as i am aware, you are pretty well out of luck. If you have solved this, let us know how!
    – DForck42
    Jan 16, 2013 at 22:22

2 Answers 2

0

So how did the MDF go away? Did the data drive get corrupted or fail?

Outside of using a third-party tool, you don't have many options.

About the only thing I can think of doing is attaching the LDF to a dummy database and then taking a tail of the log backup. But even then, it doesn't buy you anything.

Here's the basic process:

create database MyDatabase
go

-- run a full backup, this can be disgarded

alter database MyDatabase
set offline
go

-- go delete the mdf and ldf

alter database MyDatabase 
set online
go

backup log MyDatabase
to disk = 'C:\SQL Backups\MyDatabase-tail.trn'
with no_truncate
go

Now you have a LOG backup of your LDF file, but I'm not sure what you can do with it from there.

Maybe search for a product that lets you read a backup file...

Good luck!

0

It is not possible. The ldf has changes, with specific transaction numbers.

Even if you create a brand new database, EXACTLY the same as the original, the transaction numbers in the new database are not going to be related to the transaction numbers of the ldf file.

It is possible to restore with only an mdf file Related StackOverflow post

Create database dbname 
    On 
    (   
    Filename= 'path where you copied files'   
    )
    For attach; 

There are some tools and consulting firms that claim they can do it, Possibly they can recover some or even all of your data. But it can not be done, with standard tools and experience.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .