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?
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".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.