Database size limitation in SQL Express

I would generally not blog about this kind of topic, except that my customer recently talked to me about it. According to his tests, he seemed to find that the total size limitation across all databases was 10GB. That did not sound correct to me, because it is quite clearly documented that the 10GB limit is per database.

I quickly tested and found out that the documentation is correct. It is only when an individual database is attempted to be created with a data file beyond the size limit of 10GB, that you get the error:

Msg 1827, Level 16, State 4, Server SOMECOMPUTER\SQLEXPRESS, Line 1
CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 10240 MB per database.

To summarize:

  1. 10GB is the per-database, data-file size limit
  2. If you have more than one data file in your SQL Express database, the size limit is applied to the total size across all such data files
  3. Log files are not subject to this limit
Comments (8)

  1. NetTeture says:

    Actualy data is also not – if you have bulk data (large textss,binary data) you can move part of it out to a filestream and that will also not count – it is purely based on the size of the data files.

  2. Ken Creten says:

    This seems contradictory to me: "If you have more than one data file in your SQL Express database, the size limit is applied to the total size across all such data files"

    It seems to say that if you have more than one data file then be overall less than 10GB

  3. Ken, not really. The size limit is (per database) so if the database is composed of multiple data files, then the limit is across all data files in the single database.

    Do note that this is not to be confused with instance-level limits – there are no such limits (apart from implicit limits of disk space and of the total number of databases / instance.)

    Hope this clarifies!

  4. Sean Perkins says:

    I've understood that the database size was inclusive of the log file as well.  For example, I have a 9 GB .mdf and 3.5 GB .ldf, this would equal 12.5 GB to SQL Server.  Is this incorrect or am I misinformed?

    What I understand from you post is that SQL Server only pays attention to the .mdf and .ndf cumulative file sizes.  Is that correct?

  5. @Sean, this specific limit (10GB) is specific to the data file.

  6. Paul Critchlow says:

    What if I have 2 database files open?   File1.mdb and File2.mdb?   Can each one be 10gb?



  7. Tony Roma says:

    Does anyone know if it's possible to attach or restore a backup file from a previous Enterprise version of SQL Server which is over the 10GB size limit? In this case the files are already created. I am considering doing this for some testing while on the road. Thanks!

  8. Irakli Lomidze says:

    Please Change this Limitation or Remove it from upcoming SQL Server 2016 Express 🙂