SQL Server Articles, Tips, FAQs, Reviews, Whitepaper, News etc - MyTechMantra.com

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

Previous Page.. Begin Tutorial.. Next Page..

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. 

This is Part 7 of 10 Part T-SQL Enhancements in SQL Server 2016 for Developers and DBAs. Click here to read it from the beginning….

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

Trending SQL Server Articles and Tips

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 previously read topic.

Previous Page.. Begin Tutorial.. Next Page..

Related Topics

Ashish Mehta

Ashish Mehta

Ashish Kumar Mehta is a database manager, trainer and technical author. He has more than a decade of IT experience in database administration, performance tuning, database development and technical training on Microsoft SQL Server from SQL Server 2000 to SQL Server 2014. Ashish has authored more than 325 technical articles on SQL Server across leading SQL Server technology portals. Over the last few years, he has also developed and delivered many successful projects in database infrastructure; data warehouse and business intelligence; database migration; and upgrade projects for companies such as Hewlett-Packard, Microsoft, Cognizant and Centrica PLC, UK. He holds an engineering degree in computer science and industry standard certifications from Microsoft including MCITP Database Administrator 2005/2008, MCDBA SQL Server 2000 and MCTS .NET Framework 2.0 Web Applications.

Add comment

Newsletter Signup! Join 15,000+ Professionals




Be Social! Like & Follow Us...

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.

Recent SQL Server Tips