Thursday, March 8, 2012

Can i write T-SQL statements to skip other job steps

Hi All,

Please let me know. is it possible to write T-SQL statements in a job step to skip some other job steps.

Regards
Nedu. MOn the 'Advanced' tab of the 'Job Step Properties' you can play with the 'on failure' and 'On Success'.
Ex:
step 1_DO_MY_THING
on success : quit with success
on failure : go to step 2
step 2_REPORT_THE_FAILURE
on success : quit with failure
on failure : quit with failure

In other cases you could merge the steps or save the state somewhere in your db

No comments:

Post a Comment