Analyzes faults reported by the checkstorage operation corresponding to the specified operation ID, or date, and generates a list of recommended corrective actions for the specified object in the target database.
sp_dbcc_recommendations dbname [,“date”[, opid [, “objectname”]]]
is the name of the database for which recommendations are generated. Type is varchar, and this parameter is required.
is a datetime value representing the date and time the dbcc checkstorage operation (for which the reported faults will be analyzed) finished. If you do not specify date or opid, Adaptive Server uses the date of the most recent operation. If you specify both date and opid, Adaptive Server ignores the date. date is optional.
is the operation ID of the checkstorage operation, for which the reported faults will be analyzed. If an opid or date is not specified, Adaptive Server uses the date of the most recent operation. If both date and opid are specified, Adaptive Server ignores the date. The type for this parameter is int.
is the name of the object for which sp_dbcc_recommendations generates the recommendations. If an objectname is not specified, recommendations for all objects in the database are generated. The type for this parameter is varchar.
Generates a list of recommended fixes for the object t1, in database my_db, based on the faults reported by the checkstorage operation corresponding to operation id 2:
sp_dbcc_recommendations my_db, null, 2, ‘t1’
Generates a list of recommended fixes for all objects in database my_db, based on the faults reported by the checkstorage operation that finished on Sep 15 2002 at 7:10:18:463PM:
sp_dbcc_recommendations my_db, ‘Sep 15 2002 7:10:18:463PM’
Generates a list of recommended fixes for all objects in database my_db, based on the most recent checkstorage operation:
sp_dbcc_recommendations my_db
sp_dbcc_recomendations analyzes faults reported by the checkstorage operation corresponding to the specified operation ID, or date, and generates a list of recommended corrective actions for the specified object in the target database
Any valid user of the target database can run sp_dbcc_recommendations.
Copyright © 2005. Sybase Inc. All rights reserved. |