Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6810455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:12:28+00:00 2026-05-26T20:12:28+00:00

I have a parallelism issue with my first advanced SSIS package. First, here is

  • 0

I have a parallelism issue with my first “advanced” SSIS package.

First, here is the end of the package :
SSIS Package

What does this package :

  • loads data from Excel and performs some operations / aggregations / controls
  • based on a control, it determines if the row should be integrated (left branch) or not (right branch)
  • if it is ok, some calculations are performed, the row is added and a log is written with some stats (this is the OLE DB Command of the left branch)
  • if the row is rejected, it is added in a rejection file and a log is written with some stats (OLE DB Command of the right branch)

Each file load generates only ONE log row, so success and failure logs info are written on the same row (identified by execution guid and imported file name as it can imported several files during the same execution), but the columns filled are not the same.

Both OLE DB Commands call the same stored procedure that :

  • Checks if the row exists
  • If it doesn’t exists, it adds a new row
  • Else it updates the correct columns

This was working pretty well until someone raised an issue : sometimes an execution generates 2 rows : one containing the success info and one containing the rejected ones.
After analysing, I noticed that it may happen that both OLE DB Commands are executed at the same time, so both see no existing row and both insert a new one.

I’d like to know if there is a way to prevent the OLE DB Commands to be executed at the same time. Performance is not an issue here, so I don’t care if it generates higher execution times.

The only solution I see is adding a unique constraint on the table and catching the error but I’m not sure this is a really “elegant” solution (I don’t like the idea of duplicating the UPDATE statement, the “normal” one and the “exception” one) so I’m looking for a solution that doesn’t involve catching exceptions !
Of course, if there is no better solution, I guess I’ll do that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:12:28+00:00Added an answer on May 26, 2026 at 8:12 pm

    You should be able to merge the two log paths into a single write operation. Unfortunately this means they will need to be sorted: http://msdn.microsoft.com/en-us/library/ms141703.aspx

    Note that calling an OLEDBCommand over and over like this isn’t that great of an idea for large operations – sometimes it’s a lot better to bring all the data into a staging table and then use a single command to do the operation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a select SQL query which use parallelism, something like this INSERT/*+ APPEND
Have you managed to get Aptana Studio debugging to work? I tried following this,
I have been asked to show the benefits and limitations of Parallelism and evaluate
I have a feeling the answer to this is no, but using .Net 4.0's
I have this query that (stripped right down) goes something like this : SELECT
I'm studying multicore parallelism in F#. I have to admit that immutability really helps
Consider this problem: I have a program which should fetch (let's say) 100 records
I have a fairly complex query that looks something like this: create table Items(SomeOtherTableID
I have an application that has multiple threads processing work from a todo queue.
I have created a table with parallelism degree 2, however it doesn't seem like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.