Hi Friends,

This is my 13th blog on SQL Server Trace Flag 1117 in the series of One Trace Flag a Day. You can go to all blogs under that series by clicking here.

Default Behavior: Consider that we have a database which has a default Primary data filegroup with four files inside that filegroup. Each data file has some initial size like 4 MB with 2 MB auto growth. During database uses sql server come across a situation where all data files are full right now i.e. all data files of size 4 MB are Full. Then auto growth event will fire and will increase the size for first data file by 2 MB as per auto growth setting. Now SQL Server will start to use this free space inside first data file, which is generated by auto growth.

Let me show you this default behavior practically:


So from above output it is clear that under default behavior one file will grow at the time of auto grow event. Now let me show you the same code with trace flag 1117. Now if auto grow event will fire under a filegroup then all files under that filegroup will grow.


PS: Do not use trace flags in production environment without testing it on non production environments and without consulting because everything comes at a cost.


Prince Kumar Rastogi

Like us on FaceBook | Join the fastest growing SQL Server group on FaceBook

Follow Prince Rastogi on Twitter | Follow Prince Rastogi on FaceBook