Backup All Database through script ------------ Help

  • There is a job step which executes a script which does backups one after the other and upon failure for backingup of database for some reason like there is no ample disk space of file in use, the script will not backup other databases for which backup didn't happen.

    If the same script is executed either through SSMS,Query Analyzer or through job step by invoking OSQL\SQLCMD this will work.

    My question is, is there any way when a job step comes across a failure in this case while backing up a database, it will fail only for that and then continues backing up other databases through the same script(Job step should not fail even though it had seen a failed instance, it should go a head with its rest of the task and then once task is done then it should mark it as failure)

    Before we want to call osql or sqlcmd, we want to try this option.

    Any thoughts?

  • Our backup jobs have a step for each database. That makes it easy to continue if a step fails by setting the on failure action to 'go to the next step'. I wonder though, how you'll know that a database didn't get backed up if it continues on and doesn't stop with an error.

    Greg

  • Greg Charles (1/27/2010)


    Our backup jobs have a step for each database. That makes it easy to continue if a step fails by setting the on failure action to 'go to the next step'. I wonder though, how you'll know that a database didn't get backed up if it continues on and doesn't stop with an error.

    Upon backup failure for a database we are alerted through email also if you don't get any error obviously databases backup have succeeded. Also, we have other job which jobs for backups which have happened or not. If for some reason the backup process fails then the backup verification process will catch and alert us.

    I have couple of questions with your process, are you going to modify the job if there are any databases additions or deletions?

    If additions it will be easy, if it deletions then you have to modify all job steps, i think to me this is an tedious process.

  • Actually, if a step is removed, none of the other steps need to be modified unless the step that's removed is the last one. Same with adding a new step. Unless you want to backup databases in a specific order, you can always add a new one as the last step.

    Greg

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

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