2012/10/28

40GB Log File!


I was investigating the cause of lack of space on my SQL Server some more today, and did a dir /s >> dump.txt to get it out into a text file. After some Excel Kung-Fu I got a breakout of all the folders and their respective file sizes.

The one that caught my eye, was that my SQL Server folder was over 300 gigabytes. Wow. That's bloody huge. I tried shrinking it, backing it up (thinking it'd truncate the log), rebooting the entire server (thinking something was stuck) ... But no. Eventually, I found the cause.
Apparently, when you use the FULL Backup style, and do a backup - it's supposed to truncate the log file, write out the backup, and keep enough information in the log file to get it from the backup back to the current date and time. This causes the file to be huge.

My 90 MB database needed a log file of over 40 GB for some reason. I switched it over to Simple Backups, and poof. Space saved.

Now I can actually do backups of my 33+ databases, and run it on a scheduled task. Hooray!

No comments:

Post a Comment