December 24, 2008 at 9:07 am
Hi,
I am using a SSIS package to write the records to the flat file destination. During this process I am using Event Handlers OnError and Onpostexecute events. The OnError Event Produces a Failure Trigger file in my work area if any task fails.The OnPostExecute event triggers a Success trigger file when the task is completed. When an error occurs in any task, the onError event will get triggered which produces a Failure Trigger file. but again the on post execute event get triggered which even produces the success trigger file.In this case, I am not able to figure out whether it is a Success trigger or Failure Trigger. As because the OnPostExecute Event fires after the OnError Execute.Can you please help in this.
May 15, 2010 at 4:37 am
I understood your problem, even i faced the same problem.
Where i used to store the results of OnError, OnPreExecute and OnPostExecute in SQL tables.
So whenever a task execution starts, first it will fire OnPreExecute then insert a record into to Package_Process_table then fire OnPostExecute to update the Package_Process_table.
In between if an error comes then it will fire OnPreExecute, OnError and OnPostExecute.
In such case, OnError i will update Package_Process_table with status as FAILED, OnPostExecute first i will check whether the status of package is STARTED or FAILED if it is FAILED then i dont update Package_Process_table on OnPostExecute.
July 24, 2013 at 2:03 pm
Can you please tell me how you are checking for the status of the package?
July 25, 2013 at 6:02 am
If you check BOL, the OnPostExecute event fires after an executable finshes running. An error causes an executable to finish running.
____________
Just my $0.02 from over here in the cheap seats of the peanut gallery - please adjust for inflation and/or your local currency.
July 25, 2013 at 7:08 am
I am not exactly understanding the solution you provided. Can you please elaborate.
I am working on SSIS 2008 and I am having the same problem where a log gets entered from OnError as Error is task execution and there is another log where the OnPostExecute log says the task completed successfully. Is there way or a check I can add before OnPostExecute to see the status of job and then continue?
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy