
Mounting SQL Server Databases without Log Files
Yea, this probably won't matter to most of you guys, but whatever.
Basically, when you detach a database, you're supposed to have an mdf file (the database) and an ldf file (the transaction log). If you don't have the ldf, attaching the database again becomes problematic.
If there were no pending transactions when the database was detached, it's not too big a deal. Just attach the database, then in the datafiles section remove the ldf that it can't find. No big deal, though it actually took me awhile to figure that out.
However, if there were transactions happening when the database was detached, things get ugly. I found these instructions
You can't mount it like above... it won't let you. So instead, you have to create a new database with the same name as the one you're trying to restore. You then stop SQL Server in services and replace the mdb of the new, empty database with your mdb. You then use the commands above to set it into emergency mode, then do a repair with data loss. Finally, you set it back to multi user mode.
Link to the original article
http://www.codeproject.com/KB/reporting ... abase.aspx