Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a LDF file within my SQL 2005 path for SharePoint. It's 5.8 GB in size. Can I move it or delete it without killing my SharePoint data??

share|improve this question

LDF files are the transaction log files for SQL server. I would not delete it directly, but rather..

1. Right click WSS_Content and choose Tasks -> Backup
2. Select backtup type "Transaction log", select destination backup file and click Ok.
3. After backing up the DB, right click WSS_Content and choose Tasks -> Shrink -> Files
4. Select the type log and shrink action (eg release unused space)

If you don't need the transaction log, you can alter your database to use a 'Simple' rather than 'Full' recovery model, which will not keep these large files around. MSDN Link

FAIR WARNING: Always have a backup of your database/data/settings before you start mucking with it.

share|improve this answer

No, you shouldn't move or delete it (you will be unable to do so anyway if sql server is running) doing so can corrupt your database and leave it in an inconsistent state.

This is the transaction log file for your SharePoint database. It has grown to this size because:

  1. Database is in full recovery and you've run at least one full backup
  2. You're in simple recovery and you're database has been under heavy load with many open transactions and you transaction file has 'auto grown' to this size.

The solution for #1 is that you need to start doing regular log backups, or change your recovery model to simple

The solution for #2 is that you shrink the log if you really need the space, otherwise let it be.

EDIT: If you have space capacity on another drive then you can do a detach/attach moving the log file to another drive to avoid having to re-build the disk to a larger size. It's best practice to have your log files on different disks to your data files anyhow. Ensure you do the detach/attach logged in as sa (i.e. don't use integrated authentication)

share|improve this answer
Since I've done a complete backup of the Farm could I rebuild the RAID to consume the entire HDD space (currently a partition of 12 GB which is the SharePoint/OS and another one of 220 GB) and then do a restore? – AppsByAaron Aug 20 '09 at 16:58

How large is your .mdf file for that database? SharePoint databases can grow quite large, and it's possible that 5.8GB is an appropriate size for your log file.

share|improve this answer

Dont worry. Go ahead and delete it right through. SharePoint will continue working as expected. If it doesnt, then contact the database guys for help. They can restore anything anywhere.

share|improve this answer
Don't just suggest removing files! And please, don't heed such advise without your own investigation into the matter. – vonbrand Mar 3 '13 at 4:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.