sp_spaceused reports negitive number | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

sp_spaceused reports negitive number

I have a database thats is showing a negitive number for unallocated space
from the procedure sp_spaceused I have trying restrating sql server and resizing the database none of these seem to correct the problem. has anyone seen this before?

Run SP_SPACEUSED @UPDATEUSAGE=’TRUE’ always to get optimum information. _________
Satya SKJ
Moderator
SQL-Server-Performance.Com

Thanks for the help
it resolved my problem just to add:
running SP_SPACEUSED @UPDATEUSAGE=’TRUE’ actualy runs
DBCC UPDATEUSAGE behind the seens this took about 2.5 minutes for my 80GB DB I was suprised that that the statistics weren’t update as part of the restart process Thanks again
True, so its better to run updateusage during less traffic on the database. _________
Satya SKJ
Moderator
SQL-Server-Performance.Com

quote:Originally posted by BigJimSlade
I was suprised that that the statistics weren’t update as part of the restart process Thanks again

Re-starting SQL server does not update statistics. Statistics will be updated automatically, only when the ‘Auto Update statistics’ option is on for the database and SQL Server decides to update them because there are significant number of changes to the table since the last update. Also, updating statistics may not update the space usage information in sysindexes table. You need to run DBCC UPDATEUSAGE for correcting the space usage information.
]]>