Solved

sp_spaceused values

Posted on 2006-10-22
2
311 Views
Last Modified: 2006-11-18
Hi I run sp_spaceused and following result display in qa

db name=rtc
db size= 900.00MB
unallocated space = -200.86MB why it has negative value over here??
0
Comment
Question by:motioneye
2 Comments
 
LVL 35

Accepted Solution

by:
Raynard7 earned 500 total points
Comment Utility
Hi,

This seems to occur with reasonable regularity whenever large transactions are used.

sp_spaceused uses sysindexes.dpages, which in turn gets out of whack over time as the result of various activities, such as database shrinks, large-scale insert / update / delete activity, truncations etc. To correct this, simply run DBCC UPDATEUSAGE (0) but beware - this is a heavy hitting statement that can hurt a busy server, so I suggest you schedule it to run during a period of low utilisation. DBCC UPDATEUSAGE can be used to update sysindexes for all indexes, or those of a specific table (details in BOL).

from http://www.stillhq.com/sqldownunder/archives/msg02087.html
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
Comment Utility
Hi motioneye,

i agree with Raynard, this is because of the bulk activities. To correct this you can use DBCC UPDATEUSAGE as mentioned above or use    

sp_spaceused @updateusage = 'TRUE'




Cheers!
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now