SQL Server DBCC Commands: DBCC IND

SQL Server DBCC Commands: DBCC IND
Download PDF

SQL Server’s DBCC IND command is an undocumented database console command that is used to display the allocation and deallocation status of the data pages in a table or index. This command is not officially supported by Microsoft and is not intended for general use.

To use the DBCC IND command, you must first connect to your SQL Server instance and then execute the command using the following syntax:

DBCC IND (database_name, table_name, index_name);

The database_name parameter specifies the name of the database in which the table or index resides. The table_name parameter specifies the name of the table, and the index_name parameter specifies the name of the index.

For example, to display the allocation and deallocation status of the data pages for the Employee table in the AdventureWorks database, you could use the following command:

DBCC IND ('AdventureWorks', 'Employee', '');

This command will return a detailed view of the data pages for the Employee table, including information about the page number, allocation status, and deallocation status.

It’s worth noting that the DBCC IND command is an undocumented command and is not officially supported by Microsoft. As such, it should be used with caution and only in test environments. Modifying the data displayed by the command could potentially corrupt your database, so it is important to only use it for troubleshooting purposes and to consult with a database administrator before making any changes.

Overall, the DBCC IND command is a useful tool for understanding the allocation and deallocation status of the data pages in a table or index. However, it is an undocumented command and should be used with caution, as it is not officially supported by Microsoft and could potentially cause issues in your database.

Need help with this or an of the other DBCC commands? The team at Stedman Solutions, LLC specializes in repairing corrupt databases and heping when things go wrong.

 

More from Stedman Solutions:

SteveStedman5
Steve and the team at Stedman Solutions are here for all your SQL Server needs.
Contact us today for your free 30 minute consultation..
We are ready to help!

Leave a Reply

Your email address will not be published. Required fields are marked *

*