DBCC Flashcards
DBCC INPUTBUFFER
Displays the last statement sent from a client to an instance of Microsoft SQL Server.
DBCC OPENTRAN
Displays information about the oldest active transaction and the oldest distributed and nondistributed replicated transactions, if any, within the specified database.
DBCC OUTPUTBUFFER
Returns the current output buffer in hexadecimal and ASCII format for the specified session_id.
DBCC PROCCACHE
Displays information in a table format about the procedure cache.
DBCC SHOW_STATISTICS
DBCC SHOW_STATISTICS displays current query optimization statistics for a table or indexed view.
DBCC SHOWCONTIG
Displays fragmentation information for the data and indexes of the specified table or view.
Deprecated: Use sys.dm_db_index_physical_stats
DBCC SQLPERF
Provides transaction log space usage statistics for all databases. It can also be used to reset wait and latch statistics.
DBCC TRACESTATUS
Displays the status of trace flags.
DBCC USEROPTIONS
Returns the SET options active (set) for the current connection.
DBCC CHECKALLOC
Checks the consistency of disk space allocation structures for a specified database.
DBCC CHECKCATALOG
Checks for catalog consistency within the specified database. The database must be online.
DBCC CHECKCONSTRAINTS
Checks the integrity of a specified constraint or all constraints on a specified table in the current database.
DBCC CHECKDB
Checks the logical and physical integrity of all the objects in the specified database by performing the following operations:
- Runs DBCC CHECKALLOC on the database.
- Runs DBCC CHECKTABLE on every table and view in the database.
- Runs DBCC CHECKCATALOG on the database.
- Validates the contents of every indexed view in the database.
- Validates link-level consistency between table metadata and file system directories and files when storing varbinary(max) data in the file system using FILESTREAM.
- Validates the Service Broker data in the database.
DBCC CHECKFILEGROUP
Checks the allocation and structural integrity of all tables and indexed views in the specified filegroup of the current database.
DBCC CHECKIDENT
Checks the current identity value for the specified table in SQL Server and, if it is needed, changes the identity value. You can also use DBCC CHECKIDENT to manually set a new current identity value for the identity column.