Sql-server – Database Files and Filegroups

filegroupssql server

In my case wherein I have a file file_01.mdf and file_02.ndf under 1 filegroup, if ever file_01.mdf was already full (no autogrowth enabled), will it give me error on file_01.mdf if data is attempted to be added in it?

Best Answer

No, you won't get an error until both datafile are full.. The error is thrown when there is no more space in the filegroup (not for every file in it).

You can test it pretty easily by creating a database with 2 data file (one with the auto-growth enable) and inserting data in it until it fills the first data file.

You will see the the first file fills up to 100% and you won't get any error. If you disable the auto-growth on the second file and continue inserting, we will get an error when both file will be filled.

Thanks.