Hi All,

I am getting an error message when I run the following script:

EXEC master.dbo.xp_sqlmaint ' -S servername -U user -P password -D ' + @DatabaseName + ' -PlanName OptimizationPlan -Rpt C:\MaintPlanRpts\OptimizationPlan.txt -DelTxtRpt 1DAYS -WriteHistory -RebldIdx 10 -RmUnusedSpace 25 10 '

What am I doing wrong?