Fix it now
1101 means SQL Server needed a new page, the filegroup had none, and no file could grow to make one. 665 is a different problem wearing similar clothes: NTFS refused because a heavily fragmented file exhausted the attribute records it uses to track where the file lives. The first is about space and file settings, the second about fragmentation.
SELECT name, type_desc, size/128 AS size_mb, max_size, growth, is_percent_growth
FROM sys.database_files;
SELECT DISTINCT vs.volume_mount_point, vs.available_bytes/1048576 AS free_mb
FROM sys.master_files mf
CROSS APPLY sys.dm_os_volume_stats(mf.database_id, mf.file_id) vs
WHERE mf.database_id = DB_ID(N'MyDb');
- If max_size is capped or growth is zero while the volume has room, correct it:
ALTER DATABASE [MyDb] MODIFY FILE (NAME = N'MyDb', MAXSIZE = UNLIMITED, FILEGROWTH = 512MB); - If the volume is genuinely full, free space or add a file to the filegroup on a volume that has room.
- For 665, stop looking at free space. Drop any stale database snapshots, and check whether the error appeared during a CHECKDB run.
- For 665 during CHECKDB, run it with PHYSICAL_ONLY, or run it against a restored copy on another instance.
- Re-run the operation that failed and watch whether autogrow now succeeds.
A file set to UNLIMITED is still limited to 16 TB. The current 1101 message says so in its own text, and on a very large database that ceiling is a real cause rather than a footnote.
If the allocation succeeds you are done. If not, the next section separates the two refusals properly.
Why it happens
Allocation happens inside a filegroup. When a page is needed and no free extent exists in any file of that filegroup, SQL Server tries to grow one of them. If growth is disabled, capped by a maximum size, refused by the operating system because the volume is full, or blocked by the 16 TB ceiling that applies even to a file marked UNLIMITED, there is nowhere to put the page and 1101 is raised. The current message names all of those causes and then lists the three remedies: drop objects in the filegroup, add files to it, or turn autogrowth on.
The neighbouring codes describe growth failing at different moments. 5149 is a MODIFY FILE hitting an operating system error while trying to expand a file. 1802 is CREATE DATABASE failing because some of the file names listed could not be created. 5144 records an autogrow that was cancelled or timed out, and 5145 an autogrow that completed but took long enough to be worth reporting. The last two are severity 10, so they sit in the error log looking harmless while telling you that the growth increment is too large or the storage is too slow.
665 is not a SQL Server error number at all. It is the Windows file system error “The requested operation could not be completed due to a file system limitation”, and Microsoft pairs it with error 1450, “Insufficient system resources exist to complete the requested service”. Its documented cause is specific: NTFS tracks where each part of a file lives in ATTRIBUTE_LIST_ENTRY records, adjacent space compresses into a single entry, and fragmented space does not. A heavily fragmented file therefore runs out of attribute records while the volume still shows plenty of free space.
That is why 665 so often appears during a nightly consistency check on a healthy-looking volume. DBCC CHECKDB uses a sparse file for its internal snapshot, and database snapshots use sparse files too. Sparse files fragment heavily as they fill, which is exactly the condition the limit responds to.
The file cannot grow because of its own settings
You have this one if 1101 while the volume has free space, and sys.database_files shows growth of 0 or a max_size that has been reached.
- Set a sensible fixed growth increment and remove an unnecessary cap:
ALTER DATABASE [MyDb] MODIFY FILE (NAME = N'MyDb', FILEGROWTH = 512MB, MAXSIZE = UNLIMITED); - Pre-size the file to where you expect it in a year, rather than relying on growth during business hours.
- Replace percentage growth everywhere. A percentage of a large file is an unpredictable increment.
- Grant the SQL Server service account the Perform volume maintenance tasks right, which is the SE_MANAGE_VOLUME_NAME privilege, so data file growth is instant.
Instant file initialization is prevented for data files when transparent data encryption is enabled on the database, so a TDE database will still zero its data file growth.
The filegroup is genuinely out of room
You have this one if The volume is full, or every file in the filegroup has reached its maximum, or a file has reached 16 TB.
- Add space to the volume if you can, which is the least disruptive option.
- Otherwise add a file to the filegroup on a different volume:
ALTER DATABASE [MyDb] ADD FILE (NAME = N'MyDb_2', FILENAME = N'F:\Data\MyDb_2.ndf', SIZE = 20480MB, FILEGROWTH = 1024MB) TO FILEGROUP [PRIMARY]; - Look for space to release inside the database: obsolete history tables, unused indexes, archivable data.
- Check tempdb and the backup volume too. A full volume rarely affects one thing only.
NTFS refused because of sparse file fragmentation
You have this one if 665, free space is available, and a database snapshot exists or CHECKDB was running at the time.
- Drop database snapshots that are no longer needed:
DROP DATABASE [MyDb_Snapshot]; - If it happens during CHECKDB, reduce what the check has to do:
DBCC CHECKDB (N'MyDb') WITH PHYSICAL_ONLY, NO_INFOMSGS; - Or move the check off this machine entirely: restore a copy to another instance, or run it against an availability group secondary or a standby server.
- Run consistency checks when the database is quiet, so less of the sparse file is populated.
Microsoft’s own list of remedies for 665 is longer than most people expect and none of them is quick. They are covered in the reference section below.
Autogrow is timing out under load
You have this one if 5144 or 5145 in the error log, and the failures cluster at busy times.
- Reduce the growth increment so each event completes quickly, and pre-size the file so growth is rare.
- Confirm the service account holds the Perform volume maintenance tasks right for instant data file growth.
- Check whether the storage is saturated at those times. Slow growth is often slow I/O rather than a bad setting.
- Treat any growth event during business hours as a sizing problem rather than a normal occurrence.
Full reference
Which one you are looking at
| What you see | Where the fault is |
|---|---|
| 1101 with free space on the volume | Growth is disabled, or a maximum size caps the file |
| 1101 and the volume is genuinely full | Free space, add a file elsewhere, or archive data |
| 1101 on a very large single file | The 16 TB ceiling, which applies even when max_size is UNLIMITED |
| 665 during a CHECKDB run | The internal snapshot’s sparse file on the same volume as the database |
| 665 with database snapshots present | A snapshot sparse file has fragmented beyond what NTFS can track |
| 5144 or 5145 in the error log | Autogrow is too slow or timing out; the increment is too large |
| 5149 | A MODIFY FILE expansion was refused by the operating system; the message carries the OS error |
| 1802 on CREATE DATABASE | The path, the permissions or the space at the destination. Check the related errors |
What Microsoft actually recommends for 665
There is no single quick fix, and it is worth knowing the real list before committing to a maintenance window. Microsoft’s documented options are these.
- Move to ReFS, which does not carry the same ATTRIBUTE_LIST_ENTRY limit. This is the durable answer.
- Defragment the NTFS volume with a transactional defragmentation utility, which requires shutting SQL Server down.
- Copy the database files to another volume, which lets them be packed more tightly and reduces attribute usage.
- Format NTFS with the /L option to obtain a large file record segment – with Microsoft’s own caveat that this might not be helpful when the problem is DBCC CHECKDB.
- Break a very large file into several smaller ones, for example one 8 TB file into eight of 1 TB, so fewer modifications land on each.
- Use larger autogrowth increments, so growth happens less often and in bigger pieces.
- Run DBCC CHECKDB WITH PHYSICAL_ONLY, which shortens the run and reduces the chance of hitting the limit.
- Stripe backup and bulk copy operations across several volumes rather than pointing them all at one.
- Run consistency checks during low activity, or on an availability group secondary or standby server instead.
Formatting with a 64 KB allocation unit is often recommended for this error in circulation. It is not in Microsoft’s list, and it is not what the documented cause responds to. The limit is on attribute records tracking fragments, not on cluster size.
Instant file initialization, and what it no longer excludes
| File type | Benefits from instant file initialization? |
|---|---|
| Data files | Yes, on create, add, grow, autogrow and restore, if the service account or service SID holds SE_MANAGE_VOLUME_NAME |
| Data files on a TDE-enabled database | No. Instant file initialization is prevented when transparent data encryption is enabled |
| Transaction log, growth up to 64 MB | Yes, from SQL Server 2022 onwards, and SE_MANAGE_VOLUME_NAME is not required for it |
| Transaction log, growth larger than 64 MB | No |
That second half is a change worth registering, because the old rule – log files are always zeroed as they grow – stopped being true in SQL Server 2022. The default autogrowth increment for new databases is 64 MB, which is exactly the size that now benefits. Setting a much larger log growth increment gives that up.
Sizing so autogrow is a safety net rather than a routine
- Pre-size data and log files to where you expect them in a year.
- Use fixed increments in megabytes, never percentages.
- Grant Perform volume maintenance tasks to the service account, unless the database uses TDE, in which case data file growth is zeroed regardless.
- Leave autogrow enabled as a safety net. Turning it off means a busy Friday evening ends in errors rather than in a slightly larger file.
- Alert on 5144 and 5145. They are severity 10 and will sit in the error log unnoticed otherwise.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
1101 |
Could not allocate a new page because the filegroup is full, through lack of storage space or files reaching their maximum size. The message notes that files set to UNLIMITED are still limited to 16 TB | Microsoft Learn |
665 |
A Windows file system error, not a SQL Server message: the requested operation could not be completed due to a file system limitation. Caused by exhaustion of NTFS attribute records on a heavily fragmented file | Microsoft Learn |
5149 |
MODIFY FILE encountered an operating system error while attempting to expand the physical file | Microsoft Learn |
1802 |
CREATE DATABASE failed. Some file names listed could not be created. Check the related errors | Microsoft Learn |
5144 |
Autogrow of a file was cancelled by the user or timed out. Set a smaller FILEGROWTH value, or set a new file size explicitly. Severity 10 | Microsoft Learn |
5145 |
Autogrow of a file took a reportable number of milliseconds. Consider a smaller FILEGROWTH for this file. Severity 10 | Microsoft Learn |
Confirm the fix worked
- Re-run the operation that failed and confirm it completes.
- Confirm the file settings are what you intended:
SELECT name, size/128 AS size_mb, max_size, growth, is_percent_growth FROM sys.database_files; - Confirm the volumes have headroom, using the sys.dm_os_volume_stats query above.
- For 665, re-run
DBCC CHECKDB (N'MyDb') WITH NO_INFOMSGS;and confirm it completes without the file system error. - Check the error log for new 5144 or 5145 entries over the following week, which would mean growth is still too slow.
Questions people ask about this
Does this cost anything to fix?
Not in software terms. Growth settings, extra data files and filegroups are core functionality in every edition; disk space is the only thing you may have to buy. The one genuine exception is Express, which caps how large a database may become – in SQL Server 2025 that cap is 50 GB. When you reach it, the routes out are archiving data or moving to an edition without the cap.
Is 665 a SQL Server bug?
No, it is a Windows file system limit that SQL Server reports faithfully. NTFS tracks each fragment of a file in an attribute record, adjacent space compresses into one entry and fragmented space does not, so a heavily fragmented file exhausts the list while the volume still shows free space.
Will reformatting the volume with 64 KB clusters fix 665?
It is not in Microsoft’s list of remedies and it does not address the documented cause, which is attribute records tracking fragments rather than cluster size. The options Microsoft does document are ReFS, defragmentation, copying the files to another volume, formatting with /L for a large file record segment, splitting very large files, larger growth increments, PHYSICAL_ONLY checks, and running the check somewhere else.
Should I turn autogrow off and manage size by hand?
No. Leave it on as a safety net, but size files so it rarely fires. Autogrow off means a busy Friday evening ends in errors rather than a slightly larger file.
Does instant file initialization apply to log files?
Partly, and this changed. From SQL Server 2022, transaction log autogrowth events up to 64 MB benefit from instant file initialization, and that does not require the Perform volume maintenance tasks right. Growth events larger than 64 MB still do not benefit. For data files it applies fully, unless the database uses transparent data encryption, which prevents it.
