No Progress while Update

  • Hi Friends,

    I am about to update some rows so i use OLEDB command component. When i do this, my updation starts to update for few count of records and does not move further....This is my flow , OLEDB source ---> Look Up1---> LookUp2 ---> OLEDB Command

    For example , It starts to fetch 10000 records from Source and goes into OLEDB Command having 4500 records and thats it..remains still......it is not going further and not even showing any error...the data flow remains green for all the time and does not stop .....Why this kinda weird thing is happening? Where do i make mistake?

    Please give me suggestions friends....

    Thanks,
    Charmer

  • Your mistake is in using the OLE DB Command for doing updates, which is very, very slow.

    Try writing the rows to a staging table and do an UPDATE using TSQL in an Execute SQL Task.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (9/20/2012)


    Your mistake is in using the OLE DB Command for doing updates, which is very, very slow.

    Try writing the rows to a staging table and do an UPDATE using TSQL in an Execute SQL Task.

    Yes..Koen...If update does not work directly, i create a staging table and pushing the rows into the table and start updating from that table like you said...

    but what causes slowing the directly updating?

    Koen, May i know what could be the possible ways that i could have done mistakes while using OLEDB command component?

    Thanks,
    Charmer

  • Could have been anything. Syntax is probably correct, otherwise it would have errored out.

    Maybe a deadlock or something?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (9/21/2012)


    Could have been anything. Syntax is probably correct, otherwise it would have errored out.

    Maybe a deadlock or something?

    I am the only one who is using this table..i can say this database even...so i believe dead locking is not going to be the reason...but it is having 11 million records to be updated...Koen, is that one of the reason?

    Thanks,
    Charmer

  • Charmer (9/21/2012)


    Koen Verbeeck (9/21/2012)


    Could have been anything. Syntax is probably correct, otherwise it would have errored out.

    Maybe a deadlock or something?

    I am the only one who is using this table..i can say this database even...so i believe dead locking is not going to be the reason...but it is having 11 million records to be updated...Koen, is that one of the reason?

    11 million records? Dump the OLE DB command and use a staging table. Unless you like waiting for a few hours for your package to finish.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (9/21/2012)


    Charmer (9/21/2012)


    Koen Verbeeck (9/21/2012)


    Could have been anything. Syntax is probably correct, otherwise it would have errored out.

    Maybe a deadlock or something?

    I am the only one who is using this table..i can say this database even...so i believe dead locking is not going to be the reason...but it is having 11 million records to be updated...Koen, is that one of the reason?

    11 million records? Dump the OLE DB command and use a staging table. Unless you like waiting for a few hours for your package to finish.

    Even the staging table will be having 10 million records....so Koen, could you tell me how useful it will be? i mean for updating.....

    Thanks,
    Charmer

  • Charmer (9/21/2012)


    Koen Verbeeck (9/21/2012)


    Charmer (9/21/2012)


    Koen Verbeeck (9/21/2012)


    Could have been anything. Syntax is probably correct, otherwise it would have errored out.

    Maybe a deadlock or something?

    I am the only one who is using this table..i can say this database even...so i believe dead locking is not going to be the reason...but it is having 11 million records to be updated...Koen, is that one of the reason?

    11 million records? Dump the OLE DB command and use a staging table. Unless you like waiting for a few hours for your package to finish.

    Even the staging table will be having 10 million records....so Koen, could you tell me how useful it will be? i mean for updating.....

    Very useful.

    Try updating 11 million rows row by row resulting in 11 million different updates and thus 11 million records in the transaction log, or try updating 11 million records in one single transaction/update.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (9/22/2012)


    Charmer (9/21/2012)


    Koen Verbeeck (9/21/2012)


    Charmer (9/21/2012)


    Koen Verbeeck (9/21/2012)


    Could have been anything. Syntax is probably correct, otherwise it would have errored out.

    Maybe a deadlock or something?

    I am the only one who is using this table..i can say this database even...so i believe dead locking is not going to be the reason...but it is having 11 million records to be updated...Koen, is that one of the reason?

    11 million records? Dump the OLE DB command and use a staging table. Unless you like waiting for a few hours for your package to finish.

    Even the staging table will be having 10 million records....so Koen, could you tell me how useful it will be? i mean for updating.....

    Very useful.

    Try updating 11 million rows row by row resulting in 11 million different updates and thus 11 million records in the transaction log, or try updating 11 million records in one single transaction/update.

    As far as i know row by row can be done only by OLEDB comand component. If it is not going well, then what is the other solution, Koen?

    What i do here is, pushing all records into Staging table and using a Execute SQL task to update all the rows in single transaction....well, the way i do is good or any other better way? Could you tell me, Koen?

    Thanks,
    Charmer

  • Charmer (9/25/2012)


    What i do here is, pushing all records into Staging table and using a Execute SQL task to update all the rows in single transaction....well, the way i do is good or any other better way? Could you tell me, Koen?

    This is the way to go.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (9/25/2012)


    Charmer (9/25/2012)


    What i do here is, pushing all records into Staging table and using a Execute SQL task to update all the rows in single transaction....well, the way i do is good or any other better way? Could you tell me, Koen?

    This is the way to go.

    yes,Koen...even though it takes time, it will be completed rather than being still.....

    Thank you very much , Koen for all your suggestions...

    Thanks,
    Charmer

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply