HiveBrain v1.2.0
Get Started
← Back to all entries
debugsqlMinor

DBCC IND not working

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
dbccnotworkingind

Problem

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.

Solution

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

  • More about undocumented Command DBCC IND



  • How to use DBCC IND command to find out various internal SQL Server information



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

Context

StackExchange Database Administrators Q#142639, answer score: 5

Revisions (0)

No revisions yet.