Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attach only MDF, was not dettached.(system crashed)

Status
Not open for further replies.

markphsd

Programmer
Jun 24, 2002
758
US
I have a mdf only that I need to attach. The back up is several weeks old.

The system crashed so the database couldn't be detached. The ldf could not be copied because it is corrupt. I'm trying to attach the mdf to a new server, but i can't use the sp_attach_single_file_db because from what i understand it requires the mdf should have been detached.

I saw somewhere to create a new database with the ldf's name, but when trying to attach it fails.

Any help?

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
Try the sp_attach_single_file_db command anyways. It won't hurt.

I have seen a script to recreate the .ldf when it is corrupt, but I don't have a copy of it. Do a GOOGLE search and see what you find.

-SQLBill

Posting advice: FAQ481-4875
 
Sorry, had the wrong FAQ number. FAQ962-6260.

-SQLBill

Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top