sp_dbcc_summaryreport

Description

Generates a summary report on the specified database.

Syntax

sp_dbcc_summaryreport [dbname [, date] [, opname ] ] 

Parameters

dbname

specifies the name of the database for which you want the report generated. If you do not specify dbname, sp_dbcc_summaryreport generates reports on all databases in dbccdb..dbcc_operation_log for which the date is on or before the date and time specified by the date option.

date

specifies the date on which dbcc checkstorage was performed. If you do not specify a date, sp_dbcc_summaryreport uses the date of last dbcc checkstorage operation performed on the target database. This parameter is of the datatype datetime. If both the date and the time are specified for date, summary results of all the operations performed on or before the specified time are reported. If no date is specified, all operations are reported.

opname

specifies the operation. opname may be either checkstorage, which is the default, or checkverify, or both. If opname is not specified, reports are generated for all operations.

Examples

Example 1

Generates a summary report on the sybsystemprocs database, providing information on all dbcc checkstorage and dbcc checkverify operations performed:

sp_dbcc_summaryreport

DBCC Operation : checkstorage

Database Name      Start time           End Time    Operation ID
    Hard Faults Soft Faults Text Columns Abort Count 
       User Name
------------------ -------------------- ----------- ------------
    ----------- ----------- ------------ -----------
       --------------------------
sybsystemprocs     05/11/1999 14:53:11  14:53:32:163            1
              0           0            0           0
       sa
sybsystemprocs     05/11/1999 14:55:06  14:55:29:200            2
              0           0            0           0
       sa
sybsystemprocs    05/11/1999 14:56:10  14:56:27:750             3
              0           0            0           0
       sa

DBCC Operation : checkverify

Database Name      Start time           End Time    Operation ID
    Hard Faults    Soft Faults     User Name
------------------ -------------------- ----------- ------------
    -------------- --------------- --------------------- 
sybsystemprocs     05/11/1999 14:55:29  14:55:29:310            2
                 0               0 sa

Example 2

Generates a summary report on the user database testdb, providing information on all dbcc checkstorage operations performed. dbcc checkstorage was the only operation run on this database, so no dbcc checkverify information appears on the report:

sp_dbcc_summaryreport "testdb"

DBCC Operation : checkstorage

Database Name   Start time           End Time    Operation ID
    Hard Faults Soft Faults Text Columns Abort Count  User Name
--------------- -------------------- ------------ ------------
    ----------- ----------- ------------ -----------  ----------------
testdb         05/11/1999 14:55:29  14:55:49:903  1
     0           0            0           0           sa
 testdb         05/11/1999 14:55:50  14:56:9:546   2
     0           0            0           0           sa
 testdb         05/11/1999 14:56:28  14:56:40:666  3
     0           0            0           0           sa

Example 3

Generates a summary report on the sybsystemprocs database, providing information on all dbcc checkverify operations performed. Because dbcc checkverify was the specified operation, no dbcc checkstorage information appears on the report:

sp_dbcc_summaryreport null, null, "checkverify"

DBCC Operation : checkverify
Database Name   Start time           End Time    Operation ID
    Hard Faults    Soft Faults     User Name
--------------- -------------------- ------------ ------------
    -------------- --------------- --------------------- 
sybsystemprocs    05/11/1999 14:55:29   14:55:29:310          2
     0               0              sa

Example 4

Generates a summary report on the sybsystemprocs database, providing information on all dbcc checkstorage operations performed. Because dbcc checkstorage was the specified operation, no dbcc checkverify information appears on the report:

sp_dbcc_summaryreport sybsystemprocs, null, "checkstorage"

DBCC Operation : checkstorage

Database Name   Start time           End Time    Operation ID
    Hard Faults Soft Faults Text Columns Abort Count  User Name
--------------- -------------------- ------------ ------------
    ----------- ----------- ------------ -----------  ---------
sybsystemprocs   05/11/1999 14:53:11  14:53:32:163  1
    0           0            0           0            sa
sybsystemprocs   05/11/1999 14:55:06  14:55:29:200  2
    0           0            0           0            sa
sybsystemprocs   05/11/1999 14:56:10  14:56:27:750  3
    0           0            0           0            sa

Usage

Permissions

Any user can run sp_dbcc_summaryreport.

See also

Commands dbcc

dbcc stored procedures sp_dbcc_fullreport, sp_dbcc_statisticsreport, sp_dbcc_updateconfig