I want to use the Q parameter of the ISQL command when I execute the xp_sqlmaint command. However, I'm getting the following error message from ISQL when I try to execute the xp_sqlmaint command:
EXEC xp_sqlmaint '-PlanName "DB Maintenance Plan1" -Rpt
"d:\cdpq\dba\prod\log\DBMaintPlan1.txt" -WriteHistory -CkDB
-CkAl -BkUpDB -BkUpMedia DISK -UseDefDir -CrBkSubDir -DelBkUps
2weeks'
I know the syntax of the xp_sqlmaint command is fine because it works correctly when I run it from SQL Agent as a scheduled job. The command also works fine when I run it directly from Query Analyzer. What's the problem?
...