MyTechMantra.com
Connect With MyTechMantra.com

Like Us on Facebook    Follow Us on Twitter     Subscribe to our Feeds     Subscribe to NewsLetter
























SQL Server 2016: ALTER DATABASE SET AUTOGROW_ALL_FILES T-SQL Enhancement in SQL Server 2016

Read Comments   |   Related Topic: TSQL Enhancements in SQL Server 2016 > Next Topic: COMPRESS and DECOMPRESS


Click here to read about new T-SQL enhancements in SQL Server 2016 from the beginning...

ALTER DATABASE SET AUTOGROW_ALL_FILES T-SQL Enhancement in SQL Server 2016

SQL Server 2016 introduces two new options to ALTER DATABASE statement which can be used to modify database files namely AUTOGROW_SINGLE_FILE and AUTOGROW_ALL_FILES. In the earlier versions of SQL Server to achieve similar functionality you could use the trace flag 1117. This would allow all the files of the database to auto grow at the same time if they are configured files to auto grow.

One of the biggest disadvantages of using trace flag 1117 is that in the event of auto growth all the files of the database will grow. Since this trace flag is set at global level, all the databases residing on the SQL Server Instance will auto grow as per the relevant auto growth settings configured for each database file. This scenario would result in filling drive space faster.

AUTOGROW_ALL_FILES: You must choose this option if you wish to grow all the DATA and LOG files within the FILE GROUP equally. However, as a best practice one should always grow files in fixed sizes in MB or GB rather than fixed percentages as this would result in performance issues and would also result in filing the drives quickly than expected.  For more information, see Configure Database Instant File Initialization Feature in SQL Server.

Example ALTER DATABASE SET AUTOGROW_ALL_FILES

ALTER DATABASE Adventureworks MODIFY FILEGROUP [PRIMARY] AUTOGROW_ALL_FILES 
GO		

Related Tips

COMPRESS and DECOMPRESS T-SQL Enhancement in SQL Server 2016
STRING_SPLIT and STRING_ESCAPE T-SQL Enhancement in SQL Server 2016
SERVERPROPERTY T-SQL Enhancement in SQL Server 2016
TRUNCATE TABLE WITH PARTITIONS T-SQL Enhancement in SQL Server 2016
DROP IF EXISTS T-SQL Enhancement in SQL Server 2016

Thank you for taking your time to read this article. Let's be Connected....

Sign-up for Our Newsletter to Get Free SQL Server Tips and News to Build your Career

Like MyTechMantra on Facebook to get updates on What's Happening in SQL Server

Click the Next Page button to continue reading about New T-SQL enhancements in SQL Server 2016 and click on the Previous Page button to revise the previouly read topic.

Previous Page.. Next Page..




Learn More...





Last Updated On: May 14, 2016



Share this Article



Receive Free SQL Server Tips and Keep Learning
Get Free SQL Server Tips




Please leave your Valuable Comment or Let us know how this article helped you: