Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

What is a DBCC command?

Posted on 2013-06-04
4
508 Views
Last Modified: 2013-06-13
In SQL Server, what are DBCC commands? Are they still in use in SQL 2012?

Thanks
0
Comment
Question by:Ricky66
4 Comments
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 50 total points
ID: 39220681
Database Console Commands for SQL Server.

http://msdn.microsoft.com/en-us/library/ms188796.aspx
0
 
LVL 16

Assisted Solution

by:DcpKing
DcpKing earned 50 total points
ID: 39221004
Definitely very much in use! Paul Randall wrote them, so here's his blog about them:

http://www.sqlskills.com/blogs/paul/category/dbcc/

hth

Mike
0
 
LVL 3

Accepted Solution

by:
expert_dharam earned 400 total points
ID: 39222100
The Database Console Commands (DBCC) are a series of statements in Transact-SQL programming language to check the physical and logical consistency of a Microsoft SQL Server database. These commands are also used to fix existing issues. They are also used for administration and file management.

It could be executed from:
The command window
Query analyzer window

Database Console Commands have a number of advantages. Their use is extremely essential in some instances

Occasionally, there have been bad allocations of database pages.
Indexes could be destroyed or corrupted easily.
There could misunderstandings o part of the SQL server engine.
There could be problems when a large number of updates need to be carried out.
Individual pages may lose their optimal storage footprint.

Following are some of the DBCC Commands:
DBCC DBREINDEX
DBCC DBREPAIR
DBCC INDEXDEFRAG
DBCC SHRINKDATABASE
DBCC SHRINKFILE
DBCC UPDATEUSAGE
DBCC CLEANTABLE
DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE
DBCC INPUTBUFFER
DBCC OPENTRAN
DBCC OUTPUTBUFFER
DBCC PROCCACHE
DBCC SHOWCONTIG
DBCC SHOW_STATISTICS
DBCC SQLPERF
DBCC TRACESTATUS
DBCC USEROPTIONS
DBCC CHECKALLOC
DBCC CHECKCATALOG
DBCC CHECKCONSTRAINTS
DBCC CHECKDB
DBCC CHECKFILEGROUP
DBCC CHECKIDENT
DBCC CHECKTABLE
DBCC NEWALLOC
DBCC dllname (FREE)
DBCC HELP
DBCC PINTABLE
DBCC ROWLOCK
DBCC TRACEOFF
DBCC TRACEON
DBCC UNPINTABLE
0
 

Author Closing Comment

by:Ricky66
ID: 39243005
Thanks!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question