If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > multiple different insert queries

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-17-09, 02:55
ahmedwaseem2000 ahmedwaseem2000 is offline
Registered User
 
Join Date: Jan 2005
Posts: 75
multiple different insert queries

Hi,

would there be a table lock when or a dead lock or any other issue if I try to execute multiple insert queries at a time with different clients? I have tried it with my ETL tool. some times it succeeds and some times it fails. Could you please put more light on this? is it possible to run multiple insert queries?
Reply With Quote
  #2 (permalink)  
Old 03-17-09, 08:15
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Yes, multiple connections can insert into the same tables at the same time. To prevent deadlocks, the order should always be the same. e.g. insert into table A then table B then table C...

Andy
Reply With Quote
  #3 (permalink)  
Old 03-17-09, 08:21
ahmedwaseem2000 ahmedwaseem2000 is offline
Registered User
 
Join Date: Jan 2005
Posts: 75
Sorry I forgot to mention. I meant on the same table can I run multiple insert queries parallely?
Reply With Quote
  #4 (permalink)  
Old 03-17-09, 08:23
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
The answer is still the same--yes.

Andy
Reply With Quote
  #5 (permalink)  
Old 03-17-09, 14:52
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
And you can also run into deadlocks on the same table.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #6 (permalink)  
Old 03-17-09, 15:51
nick.ncs nick.ncs is offline
Registered User
 
Join Date: May 2007
Location: somewhere in dbforums
Posts: 221
or timeouts
__________________
IBM Certified Database Associate, DB2 9 for LUW
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On