How do I re-attach a database without an LDF file?
Hi everybody, I have a rather difficult situation that I have to deal with and have hit the limits of my sql/google/bing abilities. I was contacted by one of our offices requesting me to restore a database - fine thinks I - give me the file, and away we go. I was presented with a single MDF file! I have tried the solution that is deemed "normal" in this situation: CREATE DATABASE ...... FOR ATTACH_REBUILD_LOG This provides the following error: File activation failure. The physical file name "XXXXXXXX" 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. After reading this message and some further digging I have found out that: * the database system was stopped mid-operation (hence the open transactions) * only the mdf file was copied off the server * the backups were locally stored on the server * ***the server was decommissioned and disks were destroyed*** I have also tried creating a dummy DB, stealing the LDF file and starting up the database with the dummy LDF - no dice. One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files. If this is an existing database, the file may be corrupted and should be restored from a backup. I am now at the point of seeing this as a lost cause - does anyone have anything else to say that could help me along at all? Many thanks in advance for **any** help offered towards solving this big pile of FAIL.
If you have open transactions that were not completely committed to the .mdf file... I don't think you've got any hope of restoring this without having a backup available. I wish I could say something else, but there it is.