Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2003
    Posts
    1

    Red face Unanswered: Help please with Suspect Database

    I tried to remove a large LDF file that was growing out of control. Seems like SQL 2000 does not like it when that this done and now my database is marked as suspect.

    I still have the original MDF file and have tried to create a new DB using the same name and coping over the MDF file with the old one but it seems like no matter what I do I can't get the database to come back to life.

    BTW- No I don't have a current backup and I've learned my lesson.

    Is it possible to restore a database using only the MDF file?

    Thanks,
    Greg

  2. #2
    Join Date
    Sep 2002
    Location
    Mancos, CO
    Posts
    73
    I'm not aware of a restore option that does not require the transaction log (your LDF file). If you are unable to recover the LDF file you might be able to do the following.

    Stop the SQL Service
    move your MDF file to a safe location.
    Restart the SQL Service
    Create a new database that uses the exact same name for the .MDF file
    Stop the SQL Service
    Place your original .MDF file back (overwriting the one just created).
    Restart the SQL Service.
    Cross your fingers.

    Honestly I have never tried this before, and give it no better than 50-50 that it will work since Names don't always mean everything.

    If you know the name of your original .LDF file you could also try to create a new file with that name and place it into the expected path.

    Hope this helps,

    Brent

  3. #3
    Join Date
    Aug 2003
    Location
    Andover, MA
    Posts
    256
    Have you tried Detaching and Attaching the database? You can usually (I have many time) attach a database with only the MDF file, and it creates a new log.

    You can reset the suspect flag:

    http://msdn.microsoft.com/library/de...tabse_494j.asp

    and you will probably have to before it will let you detach it.
    -bpd

  4. #4
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    110
    Yes... You should be able to attach the mdf file without the ldf file. Once you get your db back online, strongly suggest reading up on transaction logs and how to manage them appropriatly.
    Cheers

  5. #5
    Join Date
    Aug 2003
    Location
    Andover, MA
    Posts
    256
    In case you don't already know, in Enterprise Manager, right-click on the database in question, select All Tasks, then Attach/Detach Database.
    -bpd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •