sp_dbcc_recommendations

Description

Reports recommendations for a database based on a checkstorage run grouping the recommendations by table and index.

Syntax

sp_dbcc_recommendations dbname [, date [, opid [, objectname]]]

Parameters

date

specifies the date on which the dbcc checkstorage operation was performed. If you do not specify a date, the date of the last checkstorage run is used.

opid

identifies the dbcc operation that was performed.

objectname

specifies the name of the table or index for which you want the report generated. If you do not specify objectname, statistics on all objects in the target database are reported.

Examples

Example 1

Run the sp_dbcc_recommendations report on the most recent checkstorage run.

sp_dbcc_recommendations pubs2

If a date or opid are not used the report gives information on all of the latest information on the most recent checkstoragerun.

If a date and opid are used, the date is ignored

Usage

When the sp_dbcc_summaryreport is called with an optional date and the optional name is NULL or checkstorage, the sp_dbcc_recommendations is invoked at the end of the report.

The report lists the recommendations in a group for each table and index.

Permissions

Any valid user for the database name specified.

See also

sp_dbcc_summaryreport, checkstorage, sp_dbcc_faultreport.