SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


No Progress while Update


No Progress while Update

Author
Message
Charmer
Charmer
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3290 Visits: 1062
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
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63204 Visits: 13298
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.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Charmer
Charmer
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3290 Visits: 1062
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
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63204 Visits: 13298
Could have been anything. Syntax is probably correct, otherwise it would have errored out.
Maybe a deadlock or something?


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Charmer
Charmer
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3290 Visits: 1062
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
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63204 Visits: 13298
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.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Charmer
Charmer
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3290 Visits: 1062
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
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63204 Visits: 13298
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.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Charmer
Charmer
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3290 Visits: 1062
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
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63204 Visits: 13298
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.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search