How to Grow All Files in a File Group Equally? – TRACE FLAG 1117 – Interview Question of the Week #201

Question: How do you make all files in a filegroup grow together?

Answer: On SQL Server 2016 and later, use the filegroup option AUTOGROW_ALL_FILES. On older versions, the historical equivalent was global trace flag 1117.

A common watering pipe feeds three matching plant pots together

I covered the newer setting in Introducing AutoGrow and Mixed_Page_Allocations Options. The change is easy to miss if you are used to entering a startup trace flag.

-- SQL Server2016 and later, inspect the current database:
SELECT name, is_autogrow_all_files FROM sys.filegroups;

-- Reviewed configuration example, not executed by this diagnostic script:
-- ALTER DATABASE AdventureWorks2025
-- MODIFY FILEGROUP [PRIMARY] AUTOGROW_ALL_FILES;

Uncomment the ALTER only after selecting the intended database and filegroup. It makes all files in that filegroup grow when autogrowth is triggered. It does not resize unequal existing files into equal sizes. Configure appropriate initial sizes, compatible fixed-size growth increments, MAXSIZE and available disk capacity separately.

Trace flag 1117 affected all databases on older releases. Historically, it was added as -T1117 in SQL Server Configuration Manager’s Database Engine Startup Parameters and required a service restart. Starting with SQL Server 2016, that flag has no effect; the filegroup option controls the behavior instead.

The original tutorial illustrated the flag using SQL Server 2017 Configuration Manager. That screenshot’s version is precisely why the instructions needed correction. Do not restart a modern instance or add 1117 merely to set filegroup growth. A filegroup option is the supported, narrower setting.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

SQL Data Storage, SQL Scripts, SQL Server, SQL TempDB, TraceFlags
Previous Post
How to Trim TIME Part in DATETIME Values? – Interview Question of the Week #200
Next Post
How to Start Database in a Single User Mode? – Interview Question of the Week #202

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.