Solved

What is a DBCC command?

Posted on 2013-06-04
4
522 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
[X]
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
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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
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.

726 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