0

This is a repost from 8 years ago, since the solutions provided there didn't worked for me, maybe now there are more alternatives for me and the other people which had that problem and couldn't solve it as well.

I have six Data Flow Task as shown in the following screenshot: SSIS Screenshot

They execute in a different order everytime I execute them, and even the first one executes twice. I've recreated the tasks, hoping it was SSIS executing them in creation order.

They run in a random order each time I execute the package despite the Precedence Constraints, so I decided to recreate the WHOLE package. Failed as well.

It simply feels like Microsoft is messing up with me, since I don't find another explanation.

Any help provided will be a relief for me if my post is not voted as Redundant.

/Edited in order to add info/

My real problem is SSIS not inserting data in a defined order. It just executes the data insert as it pleases. Because I do need data to be natively stored with a specified order. I've done it before, just don't get why this tiem is different. I could however run a ORDER BY to get the data as I want except it's not me the one who'll be accessing the data, hope the one who's gonna extract and print the data notice that.

The biggest issue however is SSIS executing twice a random task, as I can't have for any reason a duplicate of the data as it will be later used for summarizing as well.(I suspect this is connected to the random order execution since the guy who posted the original question had the exact same issue as me).

The real way to notice these issues is not looking at the SSIS processes, but looking at the data stored in the DB. Sorry if I was unclear about my problem.

Steven Guerrero
  • 876
  • 8
  • 17
  • How do you know they run in random order? How do you know what order they run in at all? – Tab Alleman Aug 27 '18 at 15:41
  • I'm with Tab on this one. Additionally, why do you have Data Flows for each month? Are they identical? If they are, consider rationalizing it down to one data flow and placing that in either a for or foreach loop container. – J Weezy Aug 27 '18 at 15:45
  • Check my comment for the answer below. – Steven Guerrero Aug 27 '18 at 15:45
  • check this link out, it has a few suggestions on how this can be fixed, though each solution seems to work for some and not others https://stackoverflow.com/questions/3255454/can-ssis-execute-tasks-in-specific-order – DarthTommy Aug 27 '18 at 18:47
  • That's the link I've visited before, but none of the solutions helped. Thank you for the try do. – Steven Guerrero Aug 28 '18 at 13:28

1 Answers1

0

The SSIS log doesn't show you the tasks in the order that they run in. In your screenshot above it looks like it put them in alphabetical order, in fact.

Just because Abril is above Enero in your execution log doesn't mean that Abril ran first and Enero ran second.

Addendum based on comments below:

You are under the misconception that if you INSERT data into a database in a certain order, that when you SELECT that data without specifying an ORDER BY, you will get the data in the order it was inserted. This turns out not to be the case. The ONLY guaranteed way to get data from a database in a certain order is to use an ORDER BY clause when you SELECT it.

Let me be perfectly clear about this. When you say "I get my data from March being listed first than my data from January, meaning it was inserted first", you are wrong.

As for why your January data seems be to getting inserted twice, we would need to see the details of all the working parts: the original source data, the destination data before insert, the destination data after insert, and the SSIS package that does the insert. Without enough information to reproduce the issue ourselves, there is no way we can help you understand why it is happening in your package.

Tab Alleman
  • 31,483
  • 7
  • 36
  • 52
  • 1. They have a different estructure as they are working with excel files with different types of data and different column names. 2. I know they are executing in random order because when they update to the DB(their final destination), the data which should be ordered for months have a complete random order. 3. You're right the screenshot above has nothing to do with the actual order they are being uploaded, I'll remove it. – Steven Guerrero Aug 27 '18 at 15:46
  • Edit your question and show an example of what you mean by this: " the data which should be ordered for months have a complete random order." Data in a database is always stored in a random order. You only give it an order when you use an ORDER BY while selecting it. – Tab Alleman Aug 27 '18 at 15:56
  • The information you added to your question still sounds like you are under a misconception. WHY do you think your data is being inserted in random order? What does your data currently look like, and what are you TRYING to get it to look like. Give examples, please. – Tab Alleman Aug 27 '18 at 17:34
  • I get my data from March being listed first than my data from January, meaning it was inserted first, a thing SSIS shouldn't be doing. Besides that it seems that my January task which should be the first one, is being executed twice and inserting twice the data from my excel document assigned to it. I will list the order it's inserted in "currently": May, April, January, June, March, January, February. I simply want my data to be inserted in the order the task are set, meaning January first, June Last. And knowing why in hell January is executing twice – Steven Guerrero Aug 27 '18 at 17:56
  • So the Data is being inserted Correctly- – Steven Guerrero Aug 27 '18 at 17:57
  • Thank you, yet I still have to find out why is January executing twice – Steven Guerrero Aug 27 '18 at 17:58
  • @steven-guerrero Why do you think January is executing twice? I've never seen SSIS execute a single task, that wasn't in a loop, multiple times. Could it be one of your other data flows inserting the same data as your January data flow? – digital.aaron Aug 27 '18 at 19:41
  • Dunno. Recreated the whole package from zero, I think My VB has serious cache issues, since many changes I make doesn't affect the task util I reset VB, sometimes not even with that. – Steven Guerrero Aug 28 '18 at 13:27