Login or Sign Up to become a member!
LessThanDot Site Logo

LessThanDot

Community Wiki

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Navigation

Google Ads

Some Undocumented DBCC Commands

From Wiki

Jump to: navigation, search

DBCC MEMORYSTATUS

  1. DBCC MEMORYSTATUS

This DBCC command provides detailed info about SQL Server memory usage


DBCC Resource

  1. DBCC TRACEON(3604)
  2.     DBCC Resource
  3.     DBCC TRACEOFF(3604)

This DBCC command list SQL Server resource utilization


DBCC DBREINDEXALL

  1. DBCC DBREINDEXALL('pubs')

This DBCC command will rebuild all the indexes for a user Database, the DB has to be exclusively locked or you will get the error message “The database could not be exclusively locked to perform the operation.”


DBCC FLUSHPROCINDB

  1. DECLARE @ID INT
  2.     SET @id =DB_ID('pubs')
  3.     DBCC FLUSHPROCINDB(@ID)

This will force a recompile of all the stored procedures in a database


Contributed by: --SQLDenis 15:37, 31 May 2008 (GMT)

Part of SQL Server Programming Hacks

Section Undocumented but handy

203 Rating: 2.3/5 (79 votes cast)