RE: Rebuild .LDF File

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Steve (anonymous_at_discussions.microsoft.com)
Date: 09/28/04


Date: Tue, 28 Sep 2004 07:57:49 -0700

Ok, I just tried your instructions and it didn't work.
The database is in emergency mode, and I can't see any of
the tables, and when I try to setup a dts, I get an error
saying that it can't initialize the database.

>-----Original Message-----
>If sp_attach_single_file doesn't work then see
>http://www.nigelrivett.net/RecoverCorruptDatabase.html
>
>"Steve" wrote:
>
>> I'm running SQL Server 2000, trying to rebuild a
>> transaction log since I only have an .MDF file. I've
tried
>> creating a new database with the same name, stopping
SQL
>> Server, then inserting the real data file, and setting
the
>> database to emergency mode, then running the DBBC
>> Rebuild_Log('dbname', 'c:\somepath') and that command
>> appears to execute ok in Query Analyzer, but the log
file
>> is not created. Is there any other method for attaching
>> the .mdf when you don't have the valid .ldf that goes
with
>> it. (I've tried sp_attach_single_file) and that doesn't
>> work either. I get an error message that says it can't
>> find the log file (this db was pulled off of another
>> system that had the log file path stored pointed to
>> another drive). Any help is appreciated.
>>
>> Thanks
>>
>.
>



Relevant Pages

  • Re: Emergency Mode
    ... 1- the log file is corrupt, and this is the best news i ... data to the new database. ... Now if you don't see any data when on emergency mode then ... >> table and change it to Normal mode for backup but I ...
    (microsoft.public.sqlserver.server)
  • Rebuild .LDF File
    ... >nb if you have the original database try it again either ... >"There is no such thing as public opinion. ... >>find the log file (this db was pulled off of another ...
    (microsoft.public.sqlserver.server)
  • Re: How to attach db with missing log file?
    ... Start SQL Service ... Database fake will appear as suspect in EM ... I support PASS - the definitive, ... > allowing me to get past the missing log file, ...
    (microsoft.public.sqlserver.server)
  • RE: Shrink File?
    ... As my understanding of you problem, you have a database with a data file ... in the log file. ... You can truncate only nonactive portion of the transaction log. ...
    (microsoft.public.sqlserver.setup)
  • Re: PerfMon recording to SQL 2005
    ... seconds or even every ne second) from a busy server to a database on ... On the Perfmon counter Log Files tab, SQL Database has been set, End File ... Configuring the log file, choose the tested DSN as the System DSN ... The user account I created in SQL is an owner of the ...
    (microsoft.public.sqlserver.server)