Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

sp_spaceused values

Posted on 2006-10-22
2
Medium Priority
?
320 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Accepted Solution

by:
Raynard7 earned 1500 total points
ID: 17785918
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
ID: 17786356
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

688 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