Shrinking the SQL Server Log File

Knowledge Base Articles by the T-Plan Support Team.
Post Reply

Shrinking the SQL Server Log File

Post by DaveB » Mon Nov 24, 2008 3:21 pm

When using SQL Server as the repository for the T-Plan tables, the SQL Server transaction log file can grow to several gigabytes in size if it is not maintained.

When creating the SQL Server database ensure that the setting 'Auto Shrink' is set to True.

To manually shrink the log file run the following two commands from the SQL Server Query window:-

dbcc shrinkfile(databaseLog,2)

databaseLog is the name of the virtual log file, rather than the physical .ldf file.
2 represents the size (in MB) of the log file after shrinking.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest