total_pages in Sys.allocation_untis returning negative values ?

  • I want to get the allocated space for a database. In goggling i find the below link

    http://msdn.microsoft.com/en-us/library/ms189792%28v=sql.90%29.aspx

    where total_pages return the allocated space for a database. however i am getting the negative values ?

    can anyone have idea ?

    Thanks

    Kumar

  • DBCC UPDATEUSAGE.

    Let me guess, a database upgraded from SQL 2000?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks,

    It is not upgraded. I have used DBCC UpdateUsage it will work. However it is taking some time. I want to an alternative for that.. ?

  • There isn't one. DBCC UPDATEUSAGE is what fixes this kind of error. Shouldn't be necessary to run after SQL 2005 SP3.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply