Large transaction log files

| 0 comments | 7,007 views
Categories:

VN:F [1.9.17_1161]
Rating: 4.6/5 (5 votes cast)

This metric measures the number of transaction log files that are greater than 10 GB. The associated alert is raised when the number of files exceeds a specified threshold.

If the transaction log autogrows rapidly, it can suggest that log backups are not being carried out frequently enough, or another resource may be preventing the log from truncating.

For more information about autogrow settings, including details on how to check what your current setting is, see Considerations for the “autogrow” and “autoshrink” settings in SQL Server (MSDN).

Large transaction log files, 4.6 out of 5 based on 5 ratings

Metric definition

Metric Name:
Large transaction log files
Description:
This metric measures the number of transaction log files that are greater than 10 GB. The associated alert is raised when the number of files exceeds the specified threshold. If the transaction log autogrows rapidly, it can suggest that log backups are not being carried out frequently enough, or another resource may be preventing the log from truncating. For more information about autogrow settings, including details on how to check what your current setting is, see Considerations for the "autogrow" and "autoshrink" settings in SQL Server (MSDN).
Enter the T-SQL query that will collect data:
DECLARE @Max_log INT;
SET @Max_log =  10240; -- size of the transaction log in MB
SELECT  COUNT(*) AS Cnt
FROM    master.sys.master_files
WHERE   type_desc = 'LOG'
        AND ( ( [size] * 8 ) / 1024 ) > @Max_log
        AND database_id = DB_ID();

Note: By default, this T-SQL counts the number of transaction log files that are greater than 10 GB. If this file size seems too high or too low for your environment, replace the SET @Max_log = 10240 value.
Select instances to collect from:
Select all
Choose databases to collect from:
All databases
Set collection frequency:
Collect data every 30 minutes
Use collected or calculated values:
Leave the Use a calculated rate of change between collections check box turned off
Metric collection is:
Enabled

Alert definition

Alert name:
Number of transaction log files increased
Description:
This alert is raised when the number of log files greater than 10 GB goes above the defined thresholds.
Raise an alert when the metric value goes:
Above the defined thresholds
Default threshold values:
Set the thresholds as follows:
High:Disabled
Medium:0
Low:Disabled
Note: These thresholds are intended as guideline values. If they seem too high or too low, replace them with values more suited to your environment.
Raise an alert when the threshold is passed for:
Enter 1 collection
This alert is:
Enabled
VN:F [1.9.17_1161]
Rating: 4.6/5 (5 votes cast)