Runs dbcc checkstorage on the specified database, then runs sp_dbcc_summaryreport or a report you specify.
sp_dbcc_runcheck dbname [, user_proc]
specifies the name of the database on which the check is to be performed.
specifies the name of the dbcc stored procedure or a user-created stored procedure that is to be run instead of sp_dbcc_summaryreport.
Checks the database engdb and generates a summary report on the information found:
sp_dbcc_runcheck "engdb"
Checks the database pubs2 and generates a full report:
sp_dbcc_runcheck "pubs2", sp_dbcc_fullreport
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 Adaptive Server.
The permission checks for sp_dbcc_runcheck differ based on your granular permissions settings.
Granular permissions enabled |
With granular permissions enabled, you must have the dbcc checkstorage and dbcc checkvverify privileges on the specified database. |
Granular permissions disabled |
With granular permissions disabled, you must be the database owner of the specified database or a user with sa_role. |
Commands dbcc
dbcc stored procedures sp_dbcc_summaryreport