Discussion Locked

Compacting .ldf file for SQL 7.0

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have an .ldf file for one of my databases that has grown to 2.6 Gb (2600 Megs!) although it is only using 31 Megs or space. I can't seem to shrink it using dbcc shrinkfile, dbcc shrinkdatabase, CHECKPOINT, or any of the Enterprise Manager utilities that I can find. Anyone out there have any ideas???

3 replies

by mark.thomson

I have found that this works (to immediately shrink a large log file) - in the enterprise manager right-click on the offending database, select "All Tasks" then select "Truncate Log", then click "OK", then shrink the database, then repeat (both truncating the log and shrinking the database). To keep it growing too big you can set the "Truncate Log on checkpoint" option to true for the database but this can be inappropriate under certain circumstances

This discussion is closed to new replies.