Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Need help - deleted did not detach database

Need help - deleted did not detach database

Need help - deleted did not detach database

Hello all,

I am new here and to the SQL world. I am creating a DM for Analysis. I received an updated mdf from my DBA so I can continue testing and get the latest information. Instead of being savvy I deleted the Database through SSMS. Did not Detach. I really screwed this up.

So when I tried to attach the new mdf file I receive this message:

File activation failure. The physical file name "c:\Program Files (x86)\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\OFC_Jay_1.LDF" may be incorrect.
The log cannot be rebuilt because there were open transactions/users when the database was shutdown, no checkpoint occurred to the database, or the database was read-only. This error could occur if the transaction log file was manually deleted or lost due to a hardware or environment failure.
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'ForbeyonOFC'. CREATE DATABASE is aborted.

What do I do? Is there a way to rebuild the Master log? Err. Any help?

RE: Need help - deleted did not detach database

You could try using sp_attach_single_file.


When your DBA sends you a database, he SHOULD be sending an mdf and an ldf file, or he should send you a backup of the database that you can restore.

Microsoft SQL Server MVP
My Blogs
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

RE: Need help - deleted did not detach database

Do you have a backup of the original database that you can restore? That will give you the .mdf and .ldf files back....but I don't see how your process will work since the .ldf you have isn't part of the .mdf you got. It might work as I've never tried that, but as George said, you should have gotten a .mdf and .ldf or a backup file from whomever sent it. Another issue will be if they did the copy of the .mdf while the database was still attached, that will make the .mdf unusable.


The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875: What should I know before I post?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close