开发者

Can SSIS execute tasks in specific order?

开发者 https://www.devze.com 2023-01-07 16:01 出处:网络
I am in process of creating an ssis package that need to do following in specified order: process some data

I am in process of creating an ssis package that need to do following in specified order:

  1. process some data
  2. move that data to some other tables
  3. Get some data and push it in a plain text file.

I have created 3 store procedure for these, I have 2 "Execute SQL tasks" for 1 and 2 and a "Data Flow task" for 3rd.

Now when i run the package i can see all 3 step are completed (no errors) but they are not running in correct order.

I see step 3 is run first then step 1 and 2, i think then step 3 runs again. Normally i can ignore it but as the data in the text file can be 700 mb, i need to find a way to get SSIS to run these task in sequen开发者_C百科ce.

I have tried "Sequence Container" but no luck.

Can some one help me with this please?

KA


You need to use precedence constraints to tell SSIS what order your tasks need to be executed in.

Drag the green arrow from task one to task two, and from task two to task three.


You could connect as

  1. first SQL execute task

  2. precedence constraint on success

  3. second SQL execute task

  4. precedence constraint on success

  5. data flow

SSIS will follow the sequence as we required.

thanks

prav


I had exactly this problem. Tasks were being executed in something like the order I'd created them rather than the sequence I specified later. It turned out that I'd managed to get a task that belonged to the first sequence container to appear in the last sequence container without loosing it's allegiance to the first. I discovered this by taking a backup and deleting sequence containers - the rogue task disappeared when I deleted the first sequence container.

The fix was to cut and past the task into the desired sequence container.


I encounterd an issue on SQL Server Denali when individual components were running out of sequence even though they were joined by success constraints. The problem seemed to occur when I had cut and pasted the components and the constraint. By deleting and reapplying the constraints, the package then ran in the correct order.


In my case, if I want to decide execute order in sequence containers, I will use [sub sequence containers] between execute sql task and data flow task. Hope useful for you.


The best is to use Sequence Containers... basically they help in creating a Sequence.

But since it does not work in your case, create Child Packages for all your different process and then create the Master Package which will have a link to those child packages, USE "Execute Package task"

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号