Shrinking the SQL Server Log File

Knowledge Base Articles by the T-Plan Support Team.
DaveB

Shrinking the SQL Server Log File

Postby 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:-

BACKUP LOG databasename WITH TRUNCATE_ONLY
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.

Return to “Knowledge Base”

Who is online

Users browsing this forum: No registered users and 2 guests