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


bulk insert operation through SSIS package.


bulk insert operation through SSIS package.

Author
Message
arooj300
arooj300
SSC Veteran
SSC Veteran (295 reputation)SSC Veteran (295 reputation)SSC Veteran (295 reputation)SSC Veteran (295 reputation)SSC Veteran (295 reputation)SSC Veteran (295 reputation)SSC Veteran (295 reputation)SSC Veteran (295 reputation)

Group: General Forum Members
Points: 295 Visits: 533
Hi All,

I am getting problem on bulk insert issue through SSIS package.

when bulk of the record inserting in the particular table from excel through SSIS package and at the same time the other want to read the data
so they are not able to read the data because of the blocking issue.

Can anyone please provide me script on this ?

Thanks...
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27421 Visits: 13268
I think it is quite normal that readers are blocked when a bulk insert operation is going on. This is to prevent dirty reads.


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
Phil Parkin
Phil Parkin
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18539 Visits: 20441
Koen Verbeeck (12/11/2013)
I think it is quite normal that readers are blocked when a bulk insert operation is going on. This is to prevent dirty reads.


+1 agreed this is sensible behaviour.

Maybe your package can be optimised - typically how many rows are you inserting and how long are the locks lasting?


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
arooj300
arooj300
SSC Veteran
SSC Veteran (295 reputation)SSC Veteran (295 reputation)SSC Veteran (295 reputation)SSC Veteran (295 reputation)SSC Veteran (295 reputation)SSC Veteran (295 reputation)SSC Veteran (295 reputation)SSC Veteran (295 reputation)

Group: General Forum Members
Points: 295 Visits: 533
Thanks for the reply...
I want to clear my question , I think this will be easy to understand.

we have a production DB. we have millions of data which client is keep sending and we have created SSIS package to copy data from excel to the DB.

At the same time when data is loading into the DB, the end user want to catch the data, because some time data is loading into the working hour also, at the same time end user can not sit idle. so that time the deadlock occurs.
for that reason I want the script or any alternate solution so that i can resolve the issue.

Thanks.
Phil Parkin
Phil Parkin
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18539 Visits: 20441
arooj300 (12/11/2013)
Thanks for the reply...
I want to clear my question , I think this will be easy to understand.

we have a production DB. we have millions of data which client is keep sending and we have created SSIS package to copy data from excel to the DB.

At the same time when data is loading into the DB, the end user want to catch the data, because some time data is loading into the working hour also, at the same time end user can not sit idle. so that time the deadlock occurs.
for that reason I want the script or any alternate solution so that i can resolve the issue.

Thanks.


Your client is sending 'millions of rows' ... in Excel? As the latest version of Excel has a max number of rows per worksheet of 1,048,576, this sounds like a cumbersome multi-worksheet solution and I'd seriously be looking into moving to a CSV load instead. Anyway, I am getting sidetracked.

Are we dealing with updates, inserts or both?

Some sort of partitioning solution may be possible and there would be almost zero deadlocks - how is the data organised, is it by some sort of transaction date?

-edit: fix typo


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27421 Visits: 13268
arooj300 (12/11/2013)
Thanks for the reply...
I want to clear my question , I think this will be easy to understand.

we have a production DB. we have millions of data which client is keep sending and we have created SSIS package to copy data from excel to the DB.

At the same time when data is loading into the DB, the end user want to catch the data, because some time data is loading into the working hour also, at the same time end user can not sit idle. so that time the deadlock occurs.
for that reason I want the script or any alternate solution so that i can resolve the issue.

Thanks.


Insert into a staging table and then partition switch the new data into the final destination table.
(if you have enterprise edition...)


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