- Error number
- 1105
- Severity
- 17 (resource or software problem)
- State
- 2
- Product
- Microsoft SQL Server Database Engine
- Versions
- All supported SQL Server versions (2016 to 2025), Azure SQL Managed Instance
- Category
- Log & Storage Space
- Last reviewed
- 23 October 2026
On this page
What it means
Error 1105 means a table or index needed a new page but every data file in its filegroup is full and cannot grow, so the insert or update fails.
Error 1105 is about data files. SQL Server stores rows in pages inside the data files of a filegroup (usually PRIMARY). When a statement needs a new page and no file in that filegroup has free space or can grow, the statement fails at severity 17 (insufficient resources) and is rolled back. Nothing is corrupted.
The message names the object (and on current versions its index), the database and the filegroup. A data file can only grow when autogrowth is on, it is below its MAXSIZE, and its volume has free space. If any of those is false, the filegroup is effectively full. When the transaction log is full instead, you get error 9002.
Common causes
- The data file has autogrowth disabled, or has reached the MAXSIZE set on it.
- The volume that holds the data file is full, so the file cannot grow even though autogrowth is on.
- The table or index lives in a secondary filegroup whose files are full, while PRIMARY still has space.
- A large load, index rebuild or long batch needs far more space than usual (an index rebuild temporarily needs room for a second copy of the index).
Diagnose it
Read-only These queries only read metadata and dynamic management views. They do not change data, permissions or configuration, so they are safe to run first.
Size, used space and growth settings of every data file
Run in the affected database.
SELECT f.name AS logical_name,
fg.name AS filegroup_name,
f.size / 128.0 AS size_mb,
CAST(FILEPROPERTY(f.name, 'SpaceUsed') AS int) / 128.0 AS used_mb,
CASE f.max_size WHEN -1 THEN 'unlimited' WHEN 0 THEN 'no growth' ELSE CAST(f.max_size / 128 AS varchar(20)) + ' MB' END AS max_size,
f.growth, f.is_percent_growth
FROM sys.database_files AS f
LEFT JOIN sys.filegroups AS fg ON fg.data_space_id = f.data_space_id
WHERE f.type_desc = 'ROWS'; The full file shows used_mb equal to size_mb and either growth = 0 or a size already at max_size.
Free space on the volumes that hold the data files
SELECT DISTINCT vs.volume_mount_point,
vs.total_bytes / 1048576 AS total_mb,
vs.available_bytes / 1048576 AS free_mb
FROM sys.master_files AS mf
CROSS APPLY sys.dm_os_volume_stats(mf.database_id, mf.file_id) AS vs
WHERE mf.database_id = DB_ID(N'AppDb'); Little or no free_mb means the files cannot grow until space is freed or files move to another volume.
Which tables use the most space in the filegroup
SELECT TOP (10) OBJECT_SCHEMA_NAME(ps.object_id) AS schema_name,
OBJECT_NAME(ps.object_id) AS table_name,
SUM(ps.reserved_page_count) / 128.0 AS reserved_mb
FROM sys.dm_db_partition_stats AS ps
GROUP BY ps.object_id
ORDER BY reserved_mb DESC; The largest tables, so you can judge whether the growth is expected or a runaway table such as an unpurged log or staging table.
How to fix it
Each fix is labelled with what it changes. Try read-only checks and the least invasive fix first, and test changes outside production.
Let the data file grow
Changes configurationIf the volume has free space, turn on autogrowth with a fixed increment and raise MAXSIZE. Use the logical file name from the first diagnostic.
ALTER DATABASE AppDb
MODIFY FILE (NAME = N'AppDb', FILEGROWTH = 256MB, MAXSIZE = 100GB);
Add a data file on a volume with space
Changes configurationWhen the current volume is full, add another file to the same filegroup on a volume that has room. New pages are allocated across the files in the filegroup.
ALTER DATABASE AppDb
ADD FILE (NAME = N'AppDb_2', FILENAME = N'E:\SqlData\AppDb_2.ndf', SIZE = 4GB, FILEGROWTH = 256MB)
TO FILEGROUP [PRIMARY];
Archive data that is no longer needed, in small batches
Changes dataOnly with the agreement of the data owner, and after confirming the data is backed up or archived elsewhere. Delete in batches so each transaction stays small and the log does not fill. Freed pages are reused by the same table; they are not returned to the volume.
Caution: Deleting data is irreversible without a backup. Do not rebuild indexes to reclaim space while the filegroup is full: a rebuild needs extra free space for the new copy of the index.
-- Archive first, then delete old rows 5,000 at a time
WHILE 1 = 1
BEGIN
DELETE TOP (5000) FROM dbo.AuditLog
WHERE logged_at < DATEADD(YEAR, -2, SYSUTCDATETIME());
IF @@ROWCOUNT = 0 BREAK;
END;
Examples
A data file that cannot grow
A throwaway database with an 8 MB data file, MAXSIZE 8 MB and no autogrowth. Inserting wide rows fills it.
-- Setup (throwaway database): data file SIZE = 8MB, MAXSIZE = 8MB, FILEGROWTH = 0
CREATE TABLE dbo.Orders (id INT IDENTITY CONSTRAINT PK_Orders PRIMARY KEY, pad CHAR(4000) NOT NULL DEFAULT 'x');
DECLARE @i INT = 0;
WHILE @i < 5000 BEGIN INSERT dbo.Orders DEFAULT VALUES; SET @i += 1; END;
Msg 1105, Level 17, State 2, Line 5 Could not allocate space for object 'dbo.Orders'.'PK_Orders' in database 'AppDb' because the 'PRIMARY' filegroup is full due to lack of storage space or database files reaching the maximum allowed size. Note that UNLIMITED files are still limited to 16TB. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
Reproduced on SQL Server 2025 (17.0.1145.4), 23 October 2026.
How to prevent it
Monitor used space per data file and free space per volume, and alert well before either runs out. Grow files ahead of large loads rather than relying on many small autogrowth events, and set MAXSIZE to a deliberate limit rather than leaving files capped by accident.
Purge or archive tables that grow without limit (audit, logging and staging tables) on a schedule. Plan data and log capacity together: the transaction log has its own limit, see error 9002.
Common questions
What is the difference between error 1105 and error 9002?
Error 1105 means a data file filegroup is full, so new pages for tables and indexes cannot be allocated. Error 9002 means the transaction log is full. They are fixed in different files: grow or add data files for 1105; back up the log, end long transactions or grow the log for 9002.
Why do I get 1105 when the disk still has free space?
Because the data file itself cannot grow: autogrowth is off or the file has reached its MAXSIZE. Check the growth and max_size columns in sys.database_files.
Does deleting rows fix error 1105?
Deleting frees pages inside the table so new rows for that table can reuse them, but the file does not get smaller and other tables may not benefit. Growing the file or adding a file is usually the right first fix; archive data only with the data owner.
Learn more on CodeWithSQL
Official documentation
- MSSQLSERVER_1105 (Microsoft Learn)
- ALTER DATABASE file and filegroup options
- Database files and filegroups
Last technically reviewed 23 October 2026; examples and diagnostics run on SQL Server 2025 (17.0.1145.4). Message text checked against the engine's sys.messages catalogue.