Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

SQL Server Express 10 GB limit reached: errors 1827 and 1105 and what to do next

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

When a SQL Server Express database reaches its size limit, writes that need more space fail with error 1105, "Could not allocate space for object ... because the '...' filegroup is full due to lack of storage space or database files reaching the maximum allowed size", and commands that grow the database fail with error 1827, "CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit". Microsoft lists the limit as 10 GB per relational database on SQL Server 2019 and 2022 Express, and 50 GB on SQL Server 2025 Express.

The fix depends on what has filled the space: real data, free space that can be reclaimed, or a different cause such as a full disk. Measure the files first. Then free space inside the database, or move the instance to an edition without the cap.

What the error means

Microsoft's table of events and errors 1000 to 1999 gives error 1827 as severity 16 with the text "CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of %I64d MB per %S_MSG." The placeholder carries the limit in megabytes and the unit the limit applies to.

Error 1105 has its own Microsoft page. The message text is "Could not allocate space for object '%.*ls'%.*ls in database '%.*ls' because the '%.*ls' 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." Microsoft's explanation is "No disk space is available in a filegroup." The error is not specific to Express, so the same message can mean a full disk, a file with a fixed maximum size, or the edition limit. You have to find which.

Microsoft's editions pages show "Maximum relational database size" in the scale-limits table. For SQL Server 2022 the values are 524 PB for Enterprise, Standard and Web, and 10 GB for Express and Express with Advanced Services. The SQL Server 2019 page shows the same 10 GB. The SQL Server 2025 page lists 524 PB for Enterprise and Standard, and 50 GB for Express. The 2025 page also says Express edition includes all the functionality that was previously in Express with Advanced Services.

Microsoft's editions and error pages do not say whether log file size counts toward the limit. The 1827 text says "cumulative database size", and the editions page says "relational database size". Measure data files and log files separately, as below, rather than assuming either way.

Likely causes

Cause What you see How to confirm
Data files have reached the edition limit 1105 on inserts or index builds; 1827 when you try to grow or create Sum of data (ROWS) file sizes is at or near 10,240 MB (10 GB)
A file has a fixed maximum size below the limit 1105 well under 10 GB max_size in sys.database_files is below the sum you expect, or growth is 0
Autogrowth is off and the file is full 1105; no growth events growth = 0 for the file
The volume is full 1105 or operating system errors alongside Free space on the drive in Windows
An index rebuild or bulk load needs temporary extra space 1105 during maintenance only Failure time matches a job; space returns after it ends
ALTER INDEX REORGANIZE on an index that spans several files, one of them full 1105 during the reorganise although other files have room Microsoft's 1105 page: the reorganisation is blocked when it tries to move rows into the full file; ALTER INDEX REBUILD is the workaround it gives

Prove the cause before changing anything

All of these are read-only.

Confirm the edition and version. Microsoft documents SERVERPROPERTY('Edition') and ProductVersion.

SELECT SERVERPROPERTY('Edition') AS Edition,
       SERVERPROPERTY('ProductVersion') AS ProductVersion;

An Express edition string confirms that the limit applies to this instance. A Standard, Web or Enterprise string means the cause is something else in the table.

Measure the files. Microsoft documents sys.database_files: size and max_size are in 8-KB pages, growth of 0 means the file is fixed size, and max_size of -1 means the file can grow until the disk is full.

SELECT name, type_desc,
       size * 8 / 1024 AS size_mb,
       CASE max_size WHEN -1 THEN NULL ELSE max_size * 8 / 1024 END AS max_mb,
       growth
FROM sys.database_files;

Run this in the database that raised the error. Add up size_mb for the ROWS files; that is the figure to compare with 10,240 MB (10 × 1,024) on SQL Server 2019 and 2022 Express, or 51,200 MB (50 × 1,024) on SQL Server 2025 Express. Then look at LOG rows separately.

Check how much of the database is used. Microsoft documents sp_spaceused without parameters: it returns database_size, which "includes both data and log files", and unallocated space, which is space not reserved for objects.

EXEC sp_spaceused;

Read the result this way. If the data files sit at the limit and unallocated space is large, there is room inside the file, so look at max_size and growth in the first query for a fixed limit below the edition cap. If the data files sit at the limit and unallocated space is small, the database holds that much data and has no room left.

Find which tables are large. Microsoft documents sp_spaceused @objname, which reports reserved, data, index and unused space for one table at a time.

Fix

Real data has reached the limit. The choices are to remove or archive data the application does not need, or to move to an edition without the cap.

Removing data frees room inside the files. It does not shrink the files. Microsoft's page on shrinking a database warns that data moved to shrink a file "can be scattered to any available location in the file. This causes index fragmentation", and that shrink operations "should not be considered a regular maintenance operation." You do not need to shrink to make room: free space inside the file can take new rows.

Disruptive step: deleting or archiving rows cannot be undone from inside the database. Take a full backup first and keep it until the application owner has confirmed the data is not needed. To back out, restore the backup into a copy and copy the rows back.

Compression. Microsoft's SQL Server 2022 editions page lists data compression as supported in Express, and its data compression page explains how compression changes what a page holds. Whether it saves enough for your tables depends on their contents. Test on a copy.

Risk: Microsoft says a table is compressed by an ALTER TABLE ... REBUILD, and that the disk space needed to enable or disable compression is the same as for creating or rebuilding an index. Rebuilding on a database already at its limit can fail for lack of space. Back out by rebuilding with compression turned off, which needs the same working space.

A file with a fixed maximum size or autogrowth off. Change the file settings only if the total remains below the edition limit. Microsoft's 1105 page names autogrowth and extra files as ways to create space, and because the Express cap is a limit on database size, neither can take you past it.

Risk: turning autogrowth on or raising a maximum size lets the file grow until it meets the edition limit or the volume fills, and a full volume stops every database on it. Note the old growth and max_size values first; back out by setting them again.

An index reorganise that raised 1105. Microsoft's 1105 page gives ALTER INDEX REBUILD instead of ALTER INDEX REORGANIZE, or a higher growth limit on the full files, as the workaround.

Risk: a rebuild rewrites the index and replaces the old one, so there is no way back to the old layout. It needs free space while it runs, so confirm the files have room first, and run it in a maintenance window.

Move to an edition without the cap. Microsoft states that "SQL Server Express can be seamlessly upgraded to other higher end editions of SQL Server." The in-place edition upgrade runs from the SQL Server Installation Center: Maintenance, then Edition Upgrade, then the instance. Microsoft's page says the product key page asks whether you are moving to a free edition or have a PID for a production edition.

Disruptive step: Microsoft says that for the edition change to be activated, Setup must restart the SQL Server services, so there is application downtime while they are offline. The upgrade also needs a licence for the target edition. To back out, Microsoft documents only an edition downgrade, which requires backing up all databases, moving the system databases, completely uninstalling the instance and installing again with the other edition's media. Plan the upgrade as a one-way change.

After an upgrade from Express, Microsoft lists extra steps: enable the SQL Server Agent service in Windows and configure its service account; disable, remove or reconfigure the BUILTIN\Users group that stays configured; note that the sizes and recovery model of tempdb and model remain unchanged; and template databases remain on the computer.

SQL Server 2025. The 50 GB figure applies to SQL Server 2025 Express. Moving an instance from an earlier version is a version upgrade, which the editions pages do not cover. Plan it with the application vendor, as application support for the new version is a separate question.

Confirm the fix

Re-run the sys.database_files query and sp_spaceused. After removing data, unallocated space should have risen by roughly the size of what you removed. Retry the failed operation, such as the import or index build. After an edition upgrade, SERVERPROPERTY('Edition') should show the new edition, and a test growth of a data file past 10,240 MB should no longer return 1827. Check the SQL Server Agent service and your backup jobs, since Express had no Agent.

Example (illustrative): on sql01, the SQLEXPRESS instance (SQL Server 2022) holds AppDB. The data file AppDB.mdf is 10,240 MB with 30 MB unallocated, and the log is 2,048 MB. A nightly import needs 120 MB and fails with 1105. The shortfall is 90 MB (120 minus 30). An audit table holds 1,100 MB of rows older than seven years that the application owner agrees to archive. That is 10.7% of the data file (1,100 divided by 10,240). After archiving and a full backup, unallocated space is 1,130 MB (30 plus 1,100), so the 120 MB import fits with 1,010 MB spare. The owner also plans an edition upgrade, because at the current growth the headroom is a stopgap.

What to watch afterwards

  • Alert at 80% of the limit, which is 8,192 MB for a 10 GB database, so you have time to act.
  • Track data file size weekly, not only when jobs fail.
  • Put growth, archiving and edition cost into one decision, and record the date the limit will next be reached.
  • After an upgrade, add log backups and Agent jobs that Express did not have.
  • Check the recovery model of model after an upgrade, as Microsoft says it is unchanged.

Risks and limits

These commands have not been run or lab-tested. The 10 GB and 50 GB limits come from Microsoft's editions pages for the versions named; confirm the page for your version before relying on a number. Microsoft's editions and error pages do not state whether the log counts toward the limit, and Microsoft's pages do not describe the exact condition that raises 1827 rather than 1105.

Do not delete data to get under the limit without a verified backup and the application owner's agreement. Do not shrink data files repeatedly: Microsoft warns it adds fragmentation. An edition upgrade restarts services and needs a licence, and the page documents no in-place way back.

Sources