hi,
if a package fails on error, would i be able to know code wise which particular task failed?
also, if the task is using a connection manager, how will i be able to access that particular connection object?
If you turn on logging then you will know what failed. Does that not suffice?
-Jamie
|||
i'm not sure if this answers you questions, however...
you could execute the package programatically and trap for a DtsTaskException that may be generated. then, you can determine which task caused the error by checking the subcomponent property of the dtserror object.
i believe that you should already know which connection manager a task uses because (as far as i know) this property cannot be set dynamically.
|||
if a task fails, i want to be able to do this PROGRAMMATICALLY on error event:
1. know which task failed and get the connection object used by the task, if any.
2. so that i will try to establish connection to the connection object and
3. reexecute the task if #2 is successful.
please let me know how to do this.
thanks.
|||
Ranier wrote: |
|
| if a task fails, i want to be able to do this PROGRAMMATICALLY on error event: 1. know which task failed and get the connection object used by the task, if any. 2. so that i will try to establish connection to the connection object and 3. reexecute the task if #2 is successful. please let me know how to do this. thanks. |
do you really want to do this? why don't you just execute the package within a transaction and then re-execute it if the package fails?|||
Hi Duane,
In essence, I want to do a retry component for every task... is this possible?
|||
Ranier wrote: |
|
| Hi Duane, In essence, I want to do a retry component for every task... is this possible? |
it may be possible, but unnecessary.
if i understand you correctly, you want to re-execute a task if it fails. why do you want to do this? wouldn't it make more sense to rollback the entire package if a task fails, and then re-execute it?
|||
the component that i want to make should be on a script task. i need to be able to reuse it on every package just drag and drop.
why do i need to retry? in cases such as intermittent connection or the target server suddenly reboots and becomes back online after a couple of minutes, i would want the script task to retry the task that failed programmatically and without human intervention.
|||
Ranier wrote: |
|
| why do i need to retry? in cases such as intermittent connection or the target server suddenly reboots and becomes back online after a couple of minutes, i would want the script task to retry the task that failed programmatically and without human intervention. |
wouldn't it make more sense to rollback the entire package if a task fails, and then re-execute it? you can use transactions and checkpoints to accomplish this.