Calls the sqlmaint utility with a string that contains sqlmaint switches. The sqlmaint utility performs a set of maintenance operations on one or more databases.
|This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.|
In the following example,
sqlmaint to perform integrity checks, create a report file, and update
EXEC xp_sqlmaint '-D AdventureWorks -PlanID 02A52657-D546-11D1-9D8A-00A0C9054212 -Rpt "C:\Program Files\Microsoft SQL Server\MSSQL\LOG\DBMaintPlan2.txt" -WriteHistory -CkDB -CkAl'
Here is the result set.
The command(s) executed successfully.