October 31, 2005 at 4:59 pm
Hello,
Is there a way to schedule a DTS package step when the prior step failed? The goal is this: I am trying to find a way to rerun a particular package on Sunday if the package failed on Saturday. I thought I'd try using two separate packages and running each within a parent package with two execute package tasks and the second one scheduled for sunday on failure of the first, but that was probably a weak idea....
Thanks and Aloha,
HiloBoy
November 2, 2005 at 6:19 am
I've never done this before, but here is a suggestion:
1. Create the job manually, then disabled it in EM.
2. Create another step in your Saturday DTS package so that if it succeeds, it runs a query to disable the Sunday DTS package. If it fails, run a query to enabled the Sunday package.
-- NOTE: You could use either of the following where clauses, whichever is more readable for you
UPDATE msdb..sysjobs
SET enabled = 0 -- 0=disabled, 1=enabled
WHERE name = 'My_DTS_Package_Name' -- replace with actual job name
-- WHERE job_id = '6CF7C3CA-5627-4EAC-B622-8C077BE84304' -- replace with actual job id
Other possibilities exist, but this seems like the easiest way.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply