SQL Server – Troubleshooting DBCC IND Not Working

dbccsql serversql-server-2008-r2

I'm trying to get the pages used by a clustered index on table1 in a SQL2008 R2 DEV box using the below query.

dbcc traceon(3604, -1) 
go 
dbcc ind (0, 'dbo.table1', 1) 
go

but it still displays the below output and doesn't display the results.What am i doing wrong here?

enter image description here

Also the below message is logged in the SQL server log

Message DBCC TRACEON 3604, server process ID (SPID) 59. This is an
informational message only; no user action is required.

Best Answer

I was able to reproduce your issue and this might be one of the reason for no result.

Cause:

When you create a table and when no record is present in the table and you run dbcc ind on such table then you get the "message like below but NO tabular result".

DBCC execution completed. If DBCC printed error messages, contact your system administrator.

If table on other hand has records you would get tabular output.

For more understanding I suggest you read following blogs from Paul Randal

These blogs would help you in understanding how to use DBCC IND to get various information from database and how to interpret the result.