DBCC HELP

Transact-SQL Reference

Transact-SQL Reference

DBCC HELP

Returns syntax information for the specified DBCC statement.

Syntax

DBCC HELP ( 'dbcc_statement' | @dbcc_statement_var | '?' )

Arguments

dbcc_statement | @dbcc_statement_var

Is the name of the DBCC statement for which to receive syntax information. Provide only the portion of the DBCC statement following the DBCC part of the statement. For example, CHECKDB rather than DBCC CHECKDB.

?

Specifies that Microsoft® SQL Server™ return all DBCC statements (minus the "DBCC" portion of the statement) for which help information can be obtained.

Result Sets

DBCC HELP returns a result set displaying the syntax for the specified DBCC statement. Syntax varies between the DBCC statements.

Permissions

DBCC HELP permissions default to members of the sysadmin fixed server role only, and are not transferable.

Examples
A. Use DBCC HELP with a variable

This example returns syntax information for DBCC CHECKDB.

DECLARE @dbcc_stmt sysname
SET @dbcc_stmt = 'CHECKDB'
DBCC HELP (@dbcc_stmt)
GO
B. Use DBCC HELP with the ? option

This example returns all DBCC statements for which help is available.

DBCC HELP ('?')
GO

See Also

DBCC