views:

1128

answers:

3

How to truncate and shrink large log files in SQL Server 2005? How to apply truncation at regular intervals?

Is there any difference between truncation and shrinking?

Thanks in advance

+1  A: 

Use the DBCC SHRINKFILE statement.

Mehrdad Afshari
+4  A: 

Use DBCC SHRINKFILE and schedule it as a job that runs regularly (preferably during off-hours).

Just be aware that there is a performance hit from regularly growing and shrinking the log file. If you have the space, you may want to set the file size to the maximum that it normally grows to and just leave it.

NYSystemsAnalyst
+1  A: 

Reliable shrinking is achieved by

  • Backup (can be truncate only)
  • Checkpoint
  • Shrink
Ed Guiness