sp_dbcc_runcheck

Description

Runs dbcc checkstorage on the specified database, then runs sp_dbcc_summaryreport or a report you specify.

Syntax

sp_dbcc_runcheck dbname [, user_proc]

Parameters

dbname

specifies the name of the database on which the check is to be performed.

user_proc

specifies the name of the dbcc stored procedure or a user-created stored procedure that is to be run instead of sp_dbcc_summaryreport.

Examples

Example 1

Checks the database engdb and generates a summary report on the information found:

sp_dbcc_runcheck "engdb"

Example 2

Checks the database pubs2 and generates a full report:

sp_dbcc_runcheck "pubs2", sp_dbcc_fullreport

Usage

Permissions

Only a System Administrator or the Database Owner can run sp_dbcc_runcheck.

See also

Commands dbcc

dbcc stored procedures sp_dbcc_summaryreport