Tom
Tom

Reputation: 8681

Sequencing of task using SSIS

I am trying to implement logging in my SSIS package. I would like to start logging by writing a message- Batch started -- to my custom log table. I am currently having the following tasks created which run in parallel. I am thinking of creating a execute sql task which will log that. How do I tell SSIS to execute sql task before executing the other tasks in the package. Do I need to move all these tasks in a sequence container.

Please find the screenshot of my package.enter image description here

Upvotes: 2

Views: 141

Answers (1)

VKarthik
VKarthik

Reputation: 1429

The best way I feel to implement logging is to have it in a non-intrusive manner i.e. to have them run in the background. SSIS provides this facility via 'Event Handlers'.

Open your package and go to 'Event Handlers'. With 'Executable' set as "Your Package Name", select 'OnPreExecute' as 'Event handler'. You then click on the hyperlink for you to proceed with adding the 'Execute SQL Task' for auditing.

Using the same above, you can then go on to add 'OnPostExecute'. Additionally this technique can be implemented across individual task level as well.

For more information you can refer to - https://learn.microsoft.com/en-us/sql/integration-services/integration-services-ssis-event-handlers

Upvotes: 1

Related Questions