Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Event Handlers in SSIS(OnError & OnPostExecute) Expand / Collapse
Author
Message
Posted Wednesday, December 24, 2008 9:07 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, September 15, 2011 1:18 PM
Points: 22, Visits: 152
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.
Post #625436
Posted Saturday, May 15, 2010 4:37 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, July 28, 2014 2:37 PM
Points: 1, Visits: 61
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.
Post #922458
Posted Wednesday, July 24, 2013 2:03 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, August 5, 2013 9:53 AM
Points: 3, Visits: 27
Can you please tell me how you are checking for the status of the package?
Post #1477255
Posted Thursday, July 25, 2013 6:02 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, December 19, 2014 5:55 AM
Points: 155, Visits: 285
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.
Post #1477448
Posted Thursday, July 25, 2013 7:08 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, August 5, 2013 9:53 AM
Points: 3, Visits: 27
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?
Post #1477470
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse