SQL Server Express Database Size Limit - Total or Used

Bart G 41 Reputation points
2021-03-15T16:40:03.537+00:00

Couldn't find an answer anywhere and it will be useful for monitoring purposes.

The SQL Express 10GB Database limit applies when the Total Database size hits 10GB but with 2GB Free space? i.e. will cause issues even though there is still free space

or It will cap at 10GB and work fine until there is 0 free space?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,654 questions
0 comments No comments
{count} votes

Accepted answer
  1. AmeliaGu-MSFT 13,961 Reputation points Microsoft Vendor
    2021-03-16T02:45:04.603+00:00

    Hi anonymous user-9572,

    It will cap at 10GB and work fine until there is 0 free space?

    Yes, you are right. If the free space has been used up when total size of the data file has been 10G, or increase the size after the data file has been 10G, you will face errors below:

    CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 10240 MB per database. (Microsoft SQL Server, Error: 1827) (Increase the size after the data file has been 10G error)

    Could not allocate space for object ‘TableName’.’IndexName’ in database ‘DatabaseName’ because the ‘PRIMARY’ filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup. (the available space has been used up error)

    In addition, please refer to this thread you opened earlier.
    If you have any other question, please feel free to let us know.

    Best Regards,
    Amelia


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Erland Sommarskog 100.8K Reputation points MVP
    2021-03-15T22:43:42.923+00:00

    There will always be some free space when you hit the limit, since space is not allocated byte by byte, but in extents of 64K. But you will be fairly close to 10 GB when you hit the limit.

    0 comments No comments

  2. Bart G 41 Reputation points
    2021-03-16T12:56:58.163+00:00

    Apologies for opening duplicate threads but none of them show in my account!

    Thanks for the answers, I think I get the gist.

    I.e. In simple terms the DB can't grow past 10GB total in size, but will contine to write to the database untill the used space also reaches 10GB.

    0 comments No comments

  3. Jon J 1 Reputation point
    2022-02-28T17:30:57.22+00:00

    The 10GB limit has nothing to do with free space on your server's disk. You could have a hundred terabytes free and it would still stop working at 10 GB. It is an artificial limitation imposed for revenue reasons. Microsoft SQL Server Express is like when a diabolical drug dealer gives you a free sample of something in the hopes that you become dependent on it, after which it will become very expensive. You should have understood this BEFORE building or implementing a solution that depends on MS SQL Server Express, that even if you never need the more advanced features, you will be forced to upgrade to a paid version eventually due to size. Do not ever deploy Microsoft SQL Server Express unless you have read and understood the entire crazy pricing structure (including CALs) and are prepared to pay up when you scale up. Microsoft's SQL products are very nice, but only if your budget is insanely large. If you didn't have the budget to eventually scale into an extremely expensive trap, you should have built for a FOSS SQL solution such as PostgreSQL instead. Sorry, but you are screwed.

    0 comments No comments

  4. Vidhyadhar TS 1 Reputation point
    2022-05-04T09:58:02.907+00:00

    Sql express edition says limit is 10GB but my database has grown more than 50GB and things are working fine and no issues reported.
    how to understand this 10 GB limit over growing 50+ GB please advise.

    If it has a limit, why is the database more than 50 GB while everything is working perfect !!

    Am concerned and confused.

    Thanks in advance