DBCC Flashcards

1
Q

DBCC INPUTBUFFER

A

Displays the last statement sent from a client to an instance of Microsoft SQL Server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

DBCC OPENTRAN

A

Displays information about the oldest active transaction and the oldest distributed and nondistributed replicated transactions, if any, within the specified database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

DBCC OUTPUTBUFFER

A

Returns the current output buffer in hexadecimal and ASCII format for the specified session_id.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

DBCC PROCCACHE

A

Displays information in a table format about the procedure cache.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

DBCC SHOW_STATISTICS

A

DBCC SHOW_STATISTICS displays current query optimization statistics for a table or indexed view.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

DBCC SHOWCONTIG

A

Displays fragmentation information for the data and indexes of the specified table or view.

Deprecated: Use sys.dm_db_index_physical_stats

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

DBCC SQLPERF

A

Provides transaction log space usage statistics for all databases. It can also be used to reset wait and latch statistics.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

DBCC TRACESTATUS

A

Displays the status of trace flags.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

DBCC USEROPTIONS

A

Returns the SET options active (set) for the current connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

DBCC CHECKALLOC

A

Checks the consistency of disk space allocation structures for a specified database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

DBCC CHECKCATALOG

A

Checks for catalog consistency within the specified database. The database must be online.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

DBCC CHECKCONSTRAINTS

A

Checks the integrity of a specified constraint or all constraints on a specified table in the current database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

DBCC CHECKDB

A

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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

DBCC CHECKFILEGROUP

A

Checks the allocation and structural integrity of all tables and indexed views in the specified filegroup of the current database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

DBCC CHECKIDENT

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

DBCC CHECKTABLE

A

Checks the integrity of all the pages and structures that make up the table or indexed view.

17
Q

DBCC CLEANTABLE

A

Reclaims space from dropped variable-length columns in tables or indexed views.

18
Q

DBCC DBREINDEX

A

Rebuilds one or more indexes for a table in the specified database.

Deprecated: Use ALTER INDEX

19
Q

DBCC DROPCLEANBUFFERS

A

Removes all clean buffers from the buffer pool.

20
Q

DBCC FREEPROCCACHE

A

Removes all elements from the plan cache, removes a specific plan from the plan cache by specifying a plan handle or SQL handle, or removes all cache entries associated with a specified resource pool.

21
Q

DBCC INDEXDEFRAG

A

Defragments indexes of the specified table or view.

Deprecated: Use ALTER INDEX

22
Q

DBCC SHRINKDATABASE

A

Shrinks the size of the data and log files in the specified database.

23
Q

DBCC SHRINKFILE

A

Shrinks the size of the specified data or log file for the current database, or empties a file by moving the data from the specified file to other files in the same filegroup, allowing the file to be removed from the database. You can shrink a file to a size that is less than the size specified when it was created. This resets the minimum file size to the new value.

24
Q

DBCC UPDATEUSAGE

A

Reports and corrects pages and row count inaccuracies in the catalog views. These inaccuracies may cause incorrect space usage reports returned by the sp_spaceused system stored procedure.

25
Q

DBCC dllname (FREE)

A

Unloads the specified extended stored procedure DLL from memory.

26
Q

DBCC FREESESSIONCACHE

A

Flushes the distributed query connection cache used by distributed queries against an instance of Microsoft SQL Server.

27
Q

DBCC FREESYSTEMCACHE

A

Releases all unused cache entries from all caches. The SQL Server Database Engine proactively cleans up unused cache entries in the background to make memory available for current entries. However, you can use this command to manually remove unused entries from all caches or from a specified Resource Governor pool cache.

28
Q

DBCC HELP

A

Returns syntax information for the specified DBCC command.

29
Q

DBCC TRACEOFF

A

Disables the specified trace flags.

30
Q

DBCC TRACEON

A

Enables the specified trace flags.

31
Q

DBCC MEMORYSTATUS

A

The DBCC MEMORYSTATUS command provides a snapshot of the current memory status.

32
Q
A