I would probably leave it. If the files are not important, you could delete them, or back them up somewhere to save space.
I've never used SQL Server so i am probably wasting my time posting this, but i hope this gets sorted.
Hi all,
We use Microsoft SQL Server at work (a mix of 2000 and 2005) and have recently discovered that a couple of our databases have massive log files (.ldf), filling up the disk. In one case it's a 7GB log file for a 200MB database!!
Is there a way to safely reduce the size of them so we can reclaim some disk space? I notice that most of our other databases have 1-5MB log files.
TIA![]()
"I would tell you a UDP joke but you might not get it."
I would probably leave it. If the files are not important, you could delete them, or back them up somewhere to save space.
I've never used SQL Server so i am probably wasting my time posting this, but i hope this gets sorted.
An opiniated, but well meaning member
PC: Intel Core 2 Quad Q6600 | Gigabyte GA-P35-DS3R | GeForce 8600GT | 4GB DDR2 RAM | Windows 7 Pro 64 Bit
Please do not give advice on things when you have no idea what you are talking about. Deleting the entire log file (not just contents) in some set-ups can render a system dead in the water, and this isn't someone's home server being discussed.
jwil1, I would wait for advice from an experienced SQL server user.
Last edited by Jen; 19-10-2011 at 06:39 AM.
You're never too old to learn something stupid.
Definitely DON'T delete those files.
Are you guys backing up these databases, and if so, how?
Any views expressed here are my own and do not necessarily represent the views of my employer or any affiliated 3rd party.
Some Server 3rd party backup programs will commit/flush the log files. Doesnt allways work thou.
in 2003 there is a reg hack to reduce the log file size (you'll have to google it)
In 2008 there is a setting in the SQL management.
Thanks for the input guys.
In the end I asked a friend who has been a DBA and he advised to set the databases in question to use Simple Recovery mode, then shrink the log files. This worked and it's all good now![]()
Last edited by jwil1; 19-10-2011 at 01:09 PM.
"I would tell you a UDP joke but you might not get it."
Good to hear. Be aware that running in Simple Recovery mode limits the recoverability of your database, should you ever need to restore from backup.
Any views expressed here are my own and do not necessarily represent the views of my employer or any affiliated 3rd party.
Bookmarks