question

nitish1300 avatar image
nitish1300 asked

Does parallel execution in SSIS work correctly?

Hello all, Hope all are doing good..!!! Can anyone say, " Are there any priorities within ddl and dml commands? " Because, I came across a scenario where I have a ssis package where in which I have **one dataflow task** in control flow, whose work is to transfer data from flatfile source(filename: Table_A with 50 records) to OLEDB destination(Table_A). I have another task called **Execute SQL Server command** task in the same control flow pane which deletes whole data from the same table (Table_A). After running this package for first time, I observed that both tasks runs parallely. **1st run:** Both tasks executed successfully with green ticks. There was data in database (all 10 records). Data hasnt being deleted by delete task. **2nd run:** Both tasks executed successfully with green ticks.. All data was deleted. **3rd run:** Both tasks executed successfully with green ticks.. There was no data and after that how many times i run the package, i saw that data was not present in the table. Now, can anyone say which task was executing and why did i see data in the first run and i saw no data from second run. Please!!! I would be great full to you if you can answer the question. Thank you in advance.
ssis2012msbisqlserver-2012
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
KenJ avatar image
KenJ answered
If you are not using precedence constraints, both tasks will execute in parallel - if the delete task finishes first, the table will have data. If the delete task finishes last, the table will be empty. If you want one task to run after the other completes, you need to set up precedent constraints to control that order (simply put; drag the green arrow from one task to the other) * MSDN Precedence Constraints: [ https://msdn.microsoft.com/en-us/library/ms141261.aspx][1] * Parallel Execution in SSIS...: [ http://www.sqlservercentral.com/blogs/samvangassql/2012/07/20/parallel-execution-in-ssis-with-maxconcurrentexecutables/][2] [1]: https://msdn.microsoft.com/en-us/library/ms141261.aspx [2]: http://www.sqlservercentral.com/blogs/samvangassql/2012/07/20/parallel-execution-in-ssis-with-maxconcurrentexecutables/
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.