sp_dbcc_runcheck

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

Examples

Usage

There are additional considerations when using sp_dbcc_runcheck:
  • sp_dbcc_runcheck runs dbcc checkstorage on the specified database.

  • If sp_dbcc_runcheck discovers any errors while running dbcc checkstorage, it then automatically runs dbcc checkverify in order to confirm or dismiss soft faults from checkstorage before running sp_dbcc_summaryreport.

  • After the dbcc checkstorage operation is complete, sp_dbcc_runcheck runs sp_dbcc_summaryreport to generate a summary report. If you specify one of the other report-generating dbcc stored procedures for dbcc_report, sp_dbcc_runcheck runs that procedure instead of sp_dbcc_summaryreport. See the System Administration Guide for a brief description and examples of all the report-generating stored procedures provided with dbccdb.

  • You can write your own report-generating stored procedure and specify its name for user_proc. The stored procedure must be self-contained. sp_dbcc_runcheck cannot pass any parameters to the SAP ASE server.

See also dbcc in Reference Manual: Commands.

Permissions

The permission checks for sp_dbcc_runcheck differ based on your granular permissions settings.

SettingDescription
Enabled

With granular permissions enabled, you must have the dbcc checkstorage and dbcc checkvverify privileges on the specified database.

Disabled

With granular permissions disabled, you must be the database owner of the specified database or a user with sa_role.

Related reference
sp_dbcc_summaryreport