negative value when I run sp_spaceused

Posted on 2006-05-18
Last Modified: 2008-02-01

I’ve run sp_spaceused against a table and I got as unused space the value of – (minus) 8KB, which is the size of a data page.

I’ve checked the filegroup that this table belongs to and there is free space for that filegroup.

How come this negative value?

Do I have to do something?

Thank you,
Question by:deepakee
    LVL 75

    Accepted Solution

    Try sp_spaceused @updateusage = true

    Author Comment

    From BOL regarding running updateusage:

    "Use it only when you suspect incorrect values are being returned and when the process will not have an adverse effect on other users or processes in the database. If preferred, DBCC UPDATEUSAGE can be run separately."

    1) What are the " adverse effect on other users or processes in the database" when running DBCC UPDATEUSAGE?

    2) Is it only a performance issue?

    2) Any issue with the actual data?

    LVL 75

    Expert Comment

    by:Aneesh Retnakaran
    The -ve value returned by sp_SpaceUsed may be, because of the operations such asl arge delete/update on the tables or dropping of indexes. In such a situations information in the sysindexes tables may not be updated. .

    >1) What are the " adverse effect on other users or processes in the database" when running DBCC UPDATEUSAGE?
    DBCC Commands take lot of IO and CPU Resources, So Make sure that the CPU is not busy, and you have enough space left in tempDB

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    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…
    When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
    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.

    732 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

    23 Experts available now in Live!

    Get 1:1 Help Now