Database
how to clear the ldf file in MS Sql Server. Other then shrink method.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Javeed M ShaikhRank #839 · 2.7K reputationPosted May 1, 2013, 9:21 AM EDT
1. Detach the database.
2. Locate the LDF file on your machine and rename it or copy it somewhere else (you canl delete this later)
3. Attach the database.
4. Click browse and sleect your mdf file.
5. after selection click on LDF file and click remove.
6. click ok to attach
7. verify on your machine if new LDF file was created, if yes then you can delete the previous renamed ldf file.
Pankaj PandeyRank #642 · 3.7K reputationPosted May 1, 2013, 8:55 PM EDT
delete ldf file
Attach the database.
browse &sleect your mdf file.
after selection click on LDF file option and click remove.
click ok to attach