Solved

What is a DBCC command?

Posted on 2013-06-04
4
501 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 82

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

758 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now