Groups | Blog | Home
all groups > sql server new users > april 2005 >

sql server new users : How to empmty my log file


Cristian Lefter
4/21/2005 12:00:00 AM
"How to stop the transaction log of a SQL Server database from growing
unexpectedly" http://support.microsoft.com/?kbid=873235

Cristian Lefter, SQL Server MVP

[quoted text, click to view]

Jasmin
4/21/2005 1:08:01 AM
Hello,
I am new here so I am sorry if this question is a little bit novice:)
Here is my problem, I am DBA with some 2 years expirience. I have an
database wiht FULL recovery model: Data file is for now about 800 MB, adn Log
file on separae disk is 1050 MB. So..I have my back up procedure every day
(Full, differential and T-log).
I have create in the morning full, about 15.00 diff..and 03.00 AM is Tlog.
In the morning I archive a .bak file and start with new.
In the back up procedure I use Append to medie, only in the morning when I
start new file I use Overwrite.
I have read in documentation that when I mack a back uf log file, it should
be an empty after thatm but my log file have same size and increasing every
day.
I have a problme with ttaj now: Can any of you help me with this?
Hari Prasad
4/21/2005 7:15:20 AM
Hi Jasmin,

First you should increase the Transaction log backup frequency. I recommend
you to perform the transaction log backup every 30 minutes.
This ensures 2:-

1. You wont loose data inase of any issues
2. Your LDF file will not grow

Once the LDF grow, even if you take a Log backup the physical file wont
shrink. After taking Log backup; You can shrink the LDF file using below
command:-

DBCC SHRINKFILE('LDF Logical name','Truncate_only')

This will reduce the LDF file size.

Thanks
Hari
SQL Server MVP

[quoted text, click to view]

AddThis Social Bookmark Button