March 6, 2007 at 3:51 pm
EM is showing 0mb space available. I did a trace to see where it was getting this info.
exec sp_spaceused
Database_Size 662.38 mb
unallocated space -763.70 mb
reserved 1,344.57812 mb
data 319.171875 mb
index 150.171875 mb
unused 875.234375 mb
Why is unallocated space negative?
I've tried to add these numbers up to get the -763, but it didn't happen. Also, what is reserved space? I thought the data file is the size that is reserved and used for data and indexes(unless specified otherwise).
BOL shows:
If objname is omitted, two result sets are returned.
Column name | Data type | Description |
---|---|---|
database_name | varchar(18) | Name of the current database. |
database_size | varchar(18) | Size of the current database. |
unallocated space | varchar(18) | Unallocated space for the database. |
Column name | Data type | Description |
---|---|---|
reserved | varchar(18) | Total amount of reserved space. |
Data | varchar(18) | Total amount of space used by data. |
index_size | varchar(18) | Space used by indexes. |
Unused | varchar(18) | Amount of unused space. |
Thanks for any insight.
March 6, 2007 at 6:24 pm
Space information is not maintained in real-time but only when indicies are rebuild or "dbcc updateusage" is run.
"dbcc updateusage" can be also be invoked by running:
exec sp_spaceused @updateusage = 'true'
SQL = Scarcely Qualifies as a Language
March 6, 2007 at 10:11 pm
March 7, 2007 at 5:05 am
remember the transaction log may grow when indexs are being rebuilt
March 7, 2007 at 10:08 am
I have seen this also and used the solution Carl suggests. Just run DBCC UPDATEUSAGE ('dbname')
-SQLBill
March 7, 2007 at 1:21 pm
Thanks Carl and Bill - sounds like that is the solution.
March 8, 2007 at 5:53 pm
Will sp_msforeachdb @command1='dbcc updateusage (''?'')' cause log growth?
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply