Autogrowth settings


Job details

Name: Autogrowth settings
Platform: Sqlserver
Category: Maintenance
Description: Checks database files auto-growth settings.
Long description: The default auto-grow settings associated with the model database are not the best settings for how databases grows. If you haven’t been diligent at setting the auto-grow parameters when you created databases then you might want scan your instance to determine which databases are using the default setting. We have split the possible file sizes and growth settings into 4 ranges. The first range, which we do not analyze, are files smaller than ‘minimum file size STEP 1′. The second rage, files between ‘minimum file size STEP 1′ and ‘minimum file size STEP 2′, are verified to have file growth settings equal ‘minimum growth size STEP 1′. The third range, files between ‘minimum file size STEP 2′ and ‘minimum file size STEP 3′, are verified to have file growth settings equal ‘minimum growth size STEP 2′. The last rage verified that all files (bigger than ‘minimum file size STEP 3′) have minimum growth settings equal or higher than ‘minimum growth size STEP 3′ and at the same time lower than ‘maximum growth size STEP 3′. Only ONLINE databases with the following properties are included: UserAccess = MULTI_USER, Updateability = READ_WRITE, IsInStandBy = 0, IsMergePublished = 0, IsPublished = 0 and IsSubscribed = 0.
Version: 2.2
Default schedule: 15 15 1 *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘2005′ & hasengine=‘YES’ & eng_inst_priv = 0 & (engine_edition = ‘Microsoft SQL Server’ engine_edition = ‘Azure SQL Managed Instance’)]

Parameters

Name Default value Description
minimum file size STEP 1 100 The minimum size (in MB) for data and transaction log files to be checked. Files with size between “minimum file size STEP 1″ and “minimum file size STEP 2″ will be checked for file growth configuration.
minimum growth size STEP 1 10 The minimum growth size (in MB) for database files with size in rage between “minimum file size STEP 1″ and “minimum file size STEP 2″ parameter values.
minimum file size STEP 2 1000 The minimum size (in MB) for data and transaction log files to be checked. Files with size between “minimum file size STEP 2″ and “minimum file size STEP 3″ will be checked for file growth configuration.
minimum growth size STEP 2 100 The minimum growth size (in MB) for database files with size in rage between “minimum file size STEP 2″ and “minimum file size STEP 3″ parameter values.
minimum file size STEP 3 10000 The minimum size (in MB) for data and transaction log files to be checked. Files with size bigger than “minimum file size STEP 3″ will be checked for file growth configuration.
minimum growth size STEP 3 500 The minimum growth size (in MB) for database files with size bigger than “minimum file size STEP 3″ parameter values.
maximum growth size STEP 3 5000 The maximum growth size (in MB) for files larger than “minimum file size STEP 3″ parameter value.
return status when grow by percentage 1 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when grow by a specific percentage.
return status when growth size too small 1 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when grow by a specific size is too small (ex. less than parameters values “minimum growth size STEP 1-3″).
return status when growth size too big 1 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when grow by a specific size is too big (ex. higher than parameters values “minimum growth size STEP 2-3″ or parameter “maximum growth size STEP 3″).
change growth settings NO If set to “YES“ the alert will change the growth settings according to all STEP values.
ignore status when change settings is on YES Return status OK when parameter “change growth settings” is set to “YES
ignore databases tempdb List of databases (separated by comma) which will be ignored. You can use % (percent sign) to represent wild card characters.

Job Summary

The dbWatch monitoring job, specifically designed for the dbWatch Control Center, focuses on evaluating and adjusting the auto-growth settings of database files across different SQL Server instances.

EXEC sp_helpfile;
This command provides information about the current size and growth settings of the database files.

Operation Details

The job operates by defining various size thresholds and corresponding growth settings for database files. It checks these settings against predefined optimal values and adjusts them if necessary.

Technical Implementation

The task is implemented through a series of SQL procedures and temporary tables that help in gathering data, executing analysis, and applying changes if necessary.

Reporting

This job provides detailed reports on auto-growth settings for database files, summarizing configurations across the server and indicating whether any settings are outside the recommended thresholds.

Conclusion

By continuously monitoring and adjusting database file growth settings, this dbWatch job plays a critical role in maintaining database performance and storage efficiency. The automated checks and potential adjustments help database administrators prevent common issues related to suboptimal auto-growth configurations.