Due to insufficient space on the server disk, the colleague prepares to add a data file to the database and place it under a different disk, and the new file is placed under the primary file group, which results in an error:
' XXX ' ' sys.sysfiles1 '. ' sysfiles1 ' the 'PRIMARY' filegroup is full. Please delete unwanted files, delete objects from filegroups, add additional files to filegroups, or enable autogrow for existing files in filegroups to increase free disk space.
Check Database discovery:
1. The primary file group has an auto-growing file (NDF), and the file contains sufficient disk space
2. The primary file (MDF) under the primary filegroup is disabled for growth (due to insufficient disk space)
After analysis and troubleshooting, guessing by the main file is disabled growth and the main file has no remaining space, fortunately, the main file is also the disk remaining small amount of space, so modify the main file to automatically grow, each increment of 10MB, the modification is completed immediately after the increase of files, the discovery of the main file added 40MB, It scared us to immediately disable the automatic growth of the main file (obediently, the remaining disk space will have to keep the next use!) )
--==========================================
Summary of recommendations:
1. Strictly control the database file maximum, such as limit to maximum 200GB, to avoid the target server cannot accommodate the maximum files when the backup is restored. (We have encountered several times on the server plug-in 1TB io card, the result data file more than 1.2TB)
2. Monitor the remaining space on the disk where the primary file is located under the primary file group of the database.
3. It is recommended that you prevent data from being under a filegroup outside of primary.
--============================================
Incurable diseases--reserve a certain amount of disk space for the disk on which the database master file resides