June 22, 2009 at 3:50 am
Hi All,
I have a problem with maintenance plan.I have two steps the first step is to clear out old backup files and second step is to EXECUTE master.dbo.xp_sqlmaint and backup files on one of our drives,but the second step keeps failing.PLEASE Help,I have tried to lookup the error with microsoft,they say the cause is, The string for the target folder (the folder specified to store the database backup, or the one used for the transaction log backup or the one used for reports) in a maintenance plan contains "-S" on my path, but Ihave check and everything looks fine.HELP PLEASE 🙁
Thanks
Dlozi
June 22, 2009 at 2:22 pm
Is it possible that step 1 is causing step 2 to fail ? Try to remove step1 and see if it works.
June 23, 2009 at 12:28 am
I will try that. Thanks
June 23, 2009 at 2:08 am
Hi did not work, any suggestions..
June 23, 2009 at 10:01 am
Redo the maintenance plan with a simple database backup and see if it works.
At work, I have a job that have two steps like yours. The first is a DTS (or SSIS) that uses ActiveScript to cleanup the files. Then I use the following SQL script to do the backup.
declare @backup_name varchar(500), @backup_date varchar(14)
--this returns yyyymmddhhmmss
set @backup_date = convert(varchar(8), getdate(), 112) + left(convert(varchar(8), getdate(), 108), 2) + substring(convert(varchar(8), getdate(), 108), 4, 2) + right(convert(varchar(8), getdate(), 108), 2)
set @backup_name = '\\ServerName\DriverLetter$\BackupFolderName\DatabaseName_' + @backup_date + '.BAK'
Backup database DatabaseName to disk = @backup_name with init
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply