DBCC SHOWCONTIG not working correctly?

DBCC SHOWCONTIG not working correctly?

Post by Stuart Hemmi » Fri, 29 Oct 1999 04:00:00



The following is from BOL...

DBCC SHOWCONTIG (T-SQL)
Displays fragmentation information for the data and indexes of the specified
table.

Syntax
DBCC SHOWCONTIG
    [
        (    table_id [, index_id]
        )
    ]

Arguments
table_id
Is the table identification number (ID) for which to check fragmentation
information. If not specified, all tables in the current database are
checked. To obtain the table ID, use the OBJECT_ID function.

index_id
Is the index identification number (ID) for which to check fragmentation
information. If not specified, the statement processes all indexes for the
specified table. To obtain the index ID, use sysindexes.

If I just run DBCC SHOWCONTIG to get the details for all tables I get the
error "An incorrect number of parameters was given to the DBCC statement."
DBCC SHOWCONTIG() returns "Line 1: Incorrect syntax near ')'."

Similarly, if I run DBCC SHOWCONTIG(194099732) I get one set of stats even
though sp_help shows that there are, in fact, 3 indexes on this table.

I'm running SQL7SP1. Is this a bug, is BOL wrong or am I doing something
dumb?
-------------------------------------------------------------------
These are *my* opinions. Please don't make the mistake of believing
anybody else is stupid enough to think like this!
-------------------------------------------------------------------


 11 Glaisdale Dr East, Bilborough   | Tel: + 44 (0) 115 971 2000
 Nottingham NG8 4BU UK              | Fax: + 44 (0) 115 929 4668
-------------------------------------------------------------------