Sql-server – What happens when one of the filegroup is full within SQL server

filegroupssql serversql-server-2012

Just a basic question due to my lack of understanding on how below works:

For one of the databases around 1 TB in size we have 8 file groups with multiple files added to them.

Now for one of the FG say FG1 there are 3 files :

FilesFG1a-has max growth restricted to 150 GB and 130 GB is used with 20 free
FilesFG1b-has max growth restricted to 150 GB and 150GB is used with 0 free
FilesFG1c-has max growth restricted to 150 GB and 150GB is used with 0 free

Now the operation will continue to work as we have 20 GB still out there on FilesFG1a but what happens when all 3 files are full within that FG1 file group?

I know we can increase the max growth restr. value as space is there on disk. But if not, will there be failures or operation tends to move data into mdf files instead of going to ndf files ?

Best Answer

Every table or index has at least one partition. Each partition is stored on a single filegroup*. So when that filegroup is full and none of its files can be expanded, any operation that needs to allocate additional space for a partition that is stored on that filegroup will fail.

*Except that a table can be configured to store its blob data on a separate database filegroup, or filesream filegroup.