Accidently deleted .ldf | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Accidently deleted .ldf

We had a developer accidently delete an .ldf file for a database and now all of its data is gone. Any suggestions on a quick restore? We use BackExec for SQL Server for backing up our data for Sql Server 7. Any suggestions. Is it possible for SQL Server to try and reconfigure a .ldf file for the database? Thanks
My first impression would be to restore the most recent backup. Yes, you will loose any data since the last backup, but if you don’t have any backups of transaction logs since that last backup, you are kind of stuck. To reduce the change of having this happen again, you should be backing up your transaction log periodically. We backup ours every 15 minutes. This way, if we should loose our database or log file, we won’t loose more than 15 minutes of data. ——————
Brad M. McGehee
The backups are not working. I have read that you can use the sp_attach_single_file_db sp to reattach the .mdf file w/o the .ldf file. Will this work? Or am I SOL w/o the .ldf file? JR
You can try the sp_attach_single_file_db procedure, but generally it is designed to work when you have appropriately detached the database
"How do you expect to beat me when I am forever?"
This is not a straight forward solution but it worked for me, I thought it may work for you. Try creating a database similar to the deleted .LDF file and stop SQL services and replace the .MDF file and restart. HTH _________
Satya SKJ