BUG: sp_spaceused on SYSLOGS May Return Negative Values

Last reviewed: April 28, 1997
Article ID: Q97551

The information in this article applies to:
  • Microsoft SQL Server version 4.2 for OS/2
BUG# OS/2: 1630 (4.2)

SYMPTOMS

The stored procedure sp_spaceused may return negative values for the unused and index values when run against SYSLOGS.

CAUSE

The data value returned by sp_spaceused is an approximate indicator of how many 2 (kilobyte) KB pages are currently being used by SYSLOGS. The reserved value is the number of pages that have been allocated to SYSLOGS and are unavailable for use by other tables. Reserved pages may or may not be actually used. Data pages are those pages that are reserved and are also actually used.

For tables other than SYSLOGS, the reserved value should always be greater than the data value; however, SYSLOGS changes so often that this statistic is not maintained in real time for performance reasons. The unused space may be negative because it is computed by subtracting data pages from reserved pages, and those values may not be up-to-date.

The index_size value should always be zero (0) because SYSLOGS has no index. Therefore, the dpages and used values should always be equal. The index_size value may be negative because it is calculated by subtracting data from sum of used pages and those values may not be current.

WORKAROUND

Run DBCC CHECKTABLE(SYSLOGS) to get the up-to-date value for the current size of SYSLOGS. The figure returned by DBCC CHECKTABLE is in terms of 2 KB pages and needs to be multiplied by two to get the size in kilobytes.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 4.2 for OS/2. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: sp_spaceused syslogs
Keywords : kbprg SSrvServer
Version : 4.2
Platform : OS/2


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.