Sql-server – Do I really need to keep .LDF files

backupdatafilesql serversql-server-2005

Each month we make an end of month snapshot of our production database. These month end snapshots are strictly for reporting purposes, there are no inserts, updates or deletes ever done on them. Each of these snapshots has an .MDF and .LDF file.

I want to delete the .LDF files and free up some space on the server. Are there any reasons why I need to keep the .LDF files?

Clarification:

Our production database is recreated each night from file extracts off of another system. We only report off of the production database… no updates are ever done.

Nightly Process:
From what I can tell…
Each night the databse tables are truncated
The tables are populated through a series of bulk insert statements
Indexes are rebuilt

Best Answer

You shouldn't delete the log file. If you are trying to reattach a data file without the log, SQL Server can technically recreate it, but there are a few potential issues, like if there were open transactions when the database was detached. In which case, you'd have total data loss.

Consume the space, and don't delete your log files. You're asking for trouble with that.

See this article on Transaction Logs, in particular the "Log Mismanagement" portion.