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??
4 Answers
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.
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:
- Database is in full recovery and you've run at least one full backup
- 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)
-
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? Aug 20, 2009 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.
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.
-
Don't just suggest removing files! And please, don't heed such advise without your own investigation into the matter.– vonbrandMar 3, 2013 at 4:28