Search code examples
c#asp.netsql-serverasp.net-membership

Sql Express 2005 Limit


I'm using SQL Express 2005 for an asp.net application which only uses Membership management.I've known that this edition has 4GB limit,but even it has I wish to know how much space I'm using in.

Is limit possible to be checked from either SQL Express Management Studio or by code (c#)?
(i.e 2.34 GB is in use)


Solution

  • It has a 4 GB limit per database and excluding any files stored in the FILESTREAM storage (if you use that).

    In order to find out how much space the whole database uses, use this stored procedure:

    EXEC sp_spaceused 
    

    You need to execute this while you're in the database you're interested in (inside e.g. SQL Server Mgmt Studio).

    This works only when using SQL Server 2008 Mgmt Studio:
    If you want to do it visually, you can bring up SQL Server Mgmt studio and connect to your SQL Express instance, and then in the Object Explorer go to the "Databases" node and then press F7 or select "View > Object Explorer Details". This will bring up a visual screen where you can pick and choose what information to see - e.g. "Data Space Used" and "Index Space Used".

    Object Explorer Details

    Marc