Re: Attaching MDF without LDF



(Taqyon@xxxxxxxxx) writes:
> Is there any way I can restore the database without the LDF file?

Maybe.

If there were no uncommitted transactions in the database at the time of
the crash, all data pages had been flushed to disk etc, the odds are
good.

But if there uncommitted transactions, or pages that had been written
to the log, but not to the data file, you will get a database that is
in poor shape. DBCC may report corruption. It may also come out clean,
but you may still have corruption on application level

If there is any value of that data to you, I stronly recommend you to
open a case with Microsoft, as a support engineer will guide you throuh
all the steps, and can also help you to devise procedures to check the
validity of your data.

If the cost of losing the data does not warrant a support call, but you
still want to give it a shot, I know of method that I will post here.
Simply because if it's applied without understanding, it can cause
even greater mess. Drop me a mail, if you want it.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

.



Relevant Pages

  • Error 1813 or "WHY didnt they call me earlier?"
    ... 3- copy the data file (mdf and ndf's) over the ones from ... 4- start sql server ... >The SQL Server 7.0 database on this server appear after ... >but I get an error telling me that ldf file and mdf file ...
    (microsoft.public.sqlserver.server)
  • Re: Recover SQL Database from suspect status
    ... Stop and start the SQL server and try accessing the webc database ... Suspect database may be due to below reasons. ... MDF or LDF files may be used during the SQL Server service startup ... LDF file might be corrupt or immediate power shutdown caused the LDF to ...
    (microsoft.public.sqlserver.server)
  • Re: Having a problem attaching a database
    ... SQL Server Storage Engine Development ... > having trouble attaching the database to pull the required information. ... Select the database that I want to attach (renamed file in new ... Click OK and a message appears asking if I want to create an ldf file. ...
    (microsoft.public.sqlserver.server)
  • Error 1813 or "WHY didnt they call me earlier?"
    ... I am sitting as second row SQL Server support. ... The SQL Server 7.0 database on this server appear after ... I have create the directory, and put the mdf file ... but I get an error telling me that ldf file and mdf file ...
    (microsoft.public.sqlserver.server)
  • Re: Missing log file...
    ... This will attach the database with MDF file and will create a new LDF file. ... Stop sql server and rename the existing MDF to a new one and copy the ...
    (microsoft.public.sqlserver.server)