IBM Support

Log Truncation with the Data Protection for SQL

Question & Answer


Question

TRUNCATE=YES parameter for the Data Protection SQL does not cause shrinking of the physical log file

Cause

Shrinking the SQL Server log is dependent on first truncating the log. Log truncation does not reduce the size of a physical log file, it only marks the virtual logs as inactive. Depending on which portion of the log file contains the active records will determine if the log file size can be reduced.

Answer

SQL Server log truncation occurs at the completion of any BACKUP LOG statement. When using the Data Protection for SQL to backup the logs, this would be performed by issuing the command:
tdpsqlc back DBName log /truncate=yes
The default for the "tdpsqlc backup ... log" command is for truncate=yes.

When a transaction log is truncated, all log records before the start of the virtual log file containing the MinLSN (minimum recovery log sequence number) are deleted. The truncated records could be at the beginning of the physical file and the current transactions at the end of the physical log file. If this is the case, the log file would not be able to shrink.

If all the virtual logs in a log file hold parts of the logical log, the file cannot shrink until a truncation marks one or more of the virtual logs at the end of the physical log as inactive. Then after a truncation, a log shrink operation would remove enough inactive virtual logs to reduce the log file.

NOTE: The shrink operation is not performed during a Data Protection for SQL log backup; this would need to be performed with the SQL Server tools.

[{"Product":{"code":"SSTFZR","label":"Tivoli Storage Manager for Databases"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Data Protection for MS SQL","Platform":[{"code":"PF033","label":"Windows"}],"Version":"Other","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}}]

Product Synonym

TSM

Document Information

More support for:
Tivoli Storage Manager for Databases

Software version:
Other

Operating system(s):
Windows

Document number:
338167

Modified date:
17 June 2018

UID

swg21199294