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?
Sql-server – Database Files and Filegroups
filegroupssql server
Related Question
- Sql-server – Database with multiple .mdf files
- Sql-server – Could not allocate space for object in database because the Filegroup is full
- Sql-server – Unable to write to ndf after shrink emptyfile
- Sql-server – Backup and Restore SQL server files and filegroups
- Sql-server – Filegroup with multiple files: odd behaviour when moving stuff in
- Sql-server – Piecemeal restore, filegroup and file extension
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.