sql server job for backup - generates error... and goes on

  • Hi all,

    I have a job that uses the utility sqlmaint to create backups for user dbs on one sql server 2005. in case in the corresponding step an error appears, the job is set to go to next step. the error that appears (sometime) is that the old backup file that must be deleted after the new one is created, is locked in read mode by a process. but not the error is the problem.

    now - the problem is that after the sqlmaint throws an error, it does not come out immediately - but still executes few more statements - i saw them in profiler (but without any export in step's report file). this seams very strange to me because i would expect to go out immediately. i have no more ideas (i tried try / catch, returned value from backup execution, more raiserrors...). (observation - the try catch does not catch this kind of error)

    10x

  • You can try to add Maintenance Cleanup task step (on success) inside the maintenance plan itself instead of adding job step. This perfectly works for me.

  • you mean - instead of letting the sqlmaint to delete the old files, to delete them using a job for cleaning stuff?

  • No, the other way around. I thought that you do it with another job step.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply