Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database size limit for SQL Express Edition

Tags:

sql-server

I am new to be SQL Server so I have read that the database size limitation of MS SQL Server 2008 Express Edition is 10 GB. Now my question is can I have multiple databases like Database A with 8 GB and Database B with size 10 GB. I mean is the size limitation for single data database or for the entire SQL Server database size.

Thx in advance

like image 568
Syam kumar Avatar asked Sep 25 '13 10:09

Syam kumar


2 Answers

Yes it been increased from 4GB to 10GB

Please refer SQL Server Express WebLog

In theory you can create multiple databases, which each should be less than 10GB

like image 59
huMpty duMpty Avatar answered Sep 23 '22 05:09

huMpty duMpty


Check this script on your SQL server -

SELECT 
      d.server_name
    , d.sversion_name
    , d.edition
    , max_db_size_in_gb = 
        CASE WHEN engine_edition = 4 -- Express version
            THEN 
                CASE 
                    WHEN d.sversion_name LIKE '%2016%' THEN 10
                    WHEN d.sversion_name LIKE '%2014%' THEN 10
                    WHEN d.sversion_name LIKE '%2012%' THEN 10
                    WHEN d.sversion_name LIKE '%2008 R2%' THEN 10
                    WHEN d.sversion_name LIKE '%2008%' THEN 4 
                    WHEN d.sversion_name LIKE '%2005%' THEN 4
                END
            ELSE -1 
        END
FROM (
    SELECT 
          sversion_name = SUBSTRING(v.ver, 0, CHARINDEX('-', v.ver) - 1)
        , engine_edition = SERVERPROPERTY('EngineEdition')
        , edition = SERVERPROPERTY('Edition')
        , server_name = SERVERPROPERTY('ServerName')
    FROM (SELECT ver = @@VERSION) v
) d

Output for SQL Server 2005 Express -

server_name      sversion_name               edition           max_db_size_in_gb
---------------- --------------------------- ----------------- -----------------
SERV1\SQL2005    Microsoft SQL Server 2005   Express Edition   4

Output for SQL Server 2012 Express -

server_name      sversion_name               edition           max_db_size_in_gb
---------------- --------------------------- ----------------- -----------------
SERV1\SQL2012    Microsoft SQL Server 2012   Express Edition   10
like image 39
Devart Avatar answered Sep 22 '22 05:09

Devart