Reputation: 2211
I ran the command:
EXEC sp_spaceused
The output was:
So what is the size of my database? Is it - 4768.25 - 4076.57 = 691.68 MB (1st table)
OR
19896 KB (2nd table)?
EDIT
I'm using SQL Server 2005 Express which has a "database size" limit of 4 GB. So in this context of "database size", if I were to calculate how far up to the space limit I am - I should consider the unallocated space as what my database can still use?
Upvotes: 0
Views: 2054
Reputation: 10356
To just add on to Mitch's answer in response to the edit you have posted :-
Unallocated space is the space that is not yet allocated to any database objects.
So, yes, i would consider 4076.57 MB as the space that your current database with total size of 4768.25 still has available for its use.
However, do note that this space is not just for your actual data. This space includes any and all space used by ANY database object like data,index,IAM (Index Allocation Map) pages, GAM (Global Allocation Map) pages, SGAM (Shared Global Allocation Map), or PFS (Page Free Space) pages
Upvotes: 1
Reputation: 300559
Your database size is 4768.25MB
SQL Server will allocate a database file bigger than the currently used space. This unallocated space is filled up until the database file needs to be 'grown' again
Upvotes: 2