SQLTeam.com | Weblogs | Forums

Deleting and recreating a log file in SQL Server

sql2008

#1

I want to know, Is it possible to create a log file for a database after detaching and deleting it from the database?


#2

Hi,
You can, if in the case of losing the Transaction log file, you can attach just the mdf back and it will create the tlog for you. However, do note that since it create the tlog from no knowledge of the DB state, you might encounter data lost (given it cannot perform its re-do and undo operation). But in the subject of answering your question, it can. But more needs to think about how you perform the check afterwards.

Hope this helps