Solved

What is a DBCC command?

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how the fundamental information of how to create a table.

785 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