DBCC IND command is one of the important commands used when indexes are analyzed. Specifically this can be used for seeing the linkage between pages associated with a given table. It requires three parameters;
DBCC IND ( {‘db_name’ | ‘db_id’}, {‘table_name’ | ‘table_id’}, {‘index_name’ | ‘index_id’ | –1}
- db_name | ‘db_id – requires database name or id. If 0 or ‘’ passed, current database will be used.
- table_name | table_id – requires table name or object id of the table.
- index_name | index_id | –1 – requires index id of the table. If –1 is used, result is generated for all the indexes.
Here is brief on output of IND command.
PageFID | File number where the page is located |
PagePID | Page number for the page |
IAMFID | File ID where the IAM page is located |
IAMPID | Page ID for the page in the data file |
ObjectID | Object ID for the associated table |
IndexID | Index ID associated with the heap or index |
PartitionNumber | Partition number for the heap or index |
PartitionID | Partition ID for the heap or index |
iam_chain_type | he type of IAM chain the extent is used for. Values can be in-row data, LOB data, and |
PageType | Number identifying the page type; 1 - Data page |
IndexLevel | Level at which the page exists in the page organizational structure. The levels are |
NextPageFID | File number where the next page at the index level is located |
NextPagePID | Page number for the next page at the index level |
PrevPageFID | File number where the previous page at the index level is located |
PrevPagePID | Page number for the previous page at the index level |
Here is an example for running the command;
DBCC IND (tempdb, 'TestTable', 2)
No comments:
Post a Comment