-
I have modified my sp a little bit and I am getting a different error.
Sp:
ALTER PROCEDURE usp_sp1
@DatabaseName varchar(20)
AS
DECLARE @cmd varchar(500)
set @cmd = 'master.dbo.xp_sqlmaint -Rpt "C:\MaintPlanRpts\OptimizationFor ' + @DatabaseName + '" -DelTxtRpt 1DAYS -WriteHistory -RebldIdx 10 -RmUnusedSpace 50 10'
exec (@cmd)
Error msg:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'Rpt'.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|