---
title: "What is the DBCC command and why it is used?"  
description: "What is the DBCC command and why it is used?"  
author: "Shikhar Arora"  
published: 2019-12-06  
canonical: https://answers.mindstick.com/qa/92521/what-is-the-dbcc-command-and-why-it-is-used  
category: "database"  
tags: ["database programming", "database"]  
reading_time: 2 minutes  

---

# What is the DBCC command and why it is used?

What is the [DBCC](https://www.mindstick.com/interview/817/what-is-the-use-of-dbcc-commands) [command](https://www.mindstick.com/blog/178/synchronous-and-asynchronous-command-execution-in-c-sharp-dot-net) and why it is used

## Answers

### Answer by Rahul Roi

![What is the DBCC command and why it is used?](https://answers.mindstick.com/questionanswer/e89e1113-ab8d-4a61-b61b-c0ab468654f2/images/483315f2-65b1-458f-a1b4-354f29f6aa1c.jpeg)\

The Database-Consistency-Checker(DBCC) will help us to check the consistency of the database, this is also known as database console commands.

These commands are divided into the below categories.

- Maintenance
- Miscellaneous
- Informational
- Validation

## DBCC HELP

This command falls under the Miscellaneous category.

## Syntax

```
DBCC HELP ('?'); 
```

## The Maintenance

Into this category includes commands for the tasks related to database, index, and filegroup, as shown below.

- CLEANTABLE
- DBREINDEX
- DROPCLEANBUFFERS
- FREEPROCCACHE
- INDEXDEFRAG,
- SHRINKDATABASE
- SHRINKFILE
- UPDATEUSAGE

## The Miscellaneous

Into this category includes commands for the tasks related to trace flag or DDL memory management, as shown below.

- HELP
- FLUSHAUTHCACHE
- TRACEOFF
- FREESESSIONCACHE
- TRACEON
- FREESYSTEMCACHE
- CLONEDATABASE

## The Informational

Into this category includes commands for tasks to collect or display different types of information, like below.

- INPUTBUFFER
- SHOWCONTIG
- OPENTRAN
- OUTPUTBUFFER
- PROCCACHE
- SHOW_STATISTICS
- SQLPERF
- TRACESTATUS
- USEROPTIONS

## The Validation

Inti this category includes commands for the tasks to perform some kind of validation actions on the [database](https://www.mindstick.com/forum/145506/what-is-deadlock-condition-in-dbms), index, tables, etc., which I would say are more useful in certain ways, like below.

- CHECKALLOC
- CHECKCATALOG
- CHECKCONSTRAINTS
- CHECKDB
- CHECKFILEGROUP
- CHECKIDENT
- CHECKTABLE


---

Original Source: https://answers.mindstick.com/qa/92521/what-is-the-dbcc-command-and-why-it-is-used

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
