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 > Duplicate Inserts in DB 8.1 tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-13-09, 12:25
jjagarwal jjagarwal is offline
Registered User
 
Join Date: Oct 2009
Posts: 2
Duplicate Inserts in DB 8.1 tables

I have been experiencing this strange problem for a while. Several tables in my DB2 Ver. 8.1 database are getting duplicate rows even when it is through single INSERT statement. For example for customer name and address there are duplicate records for the same customer within an interval of milliseconds. Of Course these rows are not in violation of PK because this table has customer id as Identity column. The insertion is happening via Flex based browser application when people register themselves to our application. The request goes through IBM WebSphere App Server and the insertion happens via DB2 stored procedure. I do explicitly commit the transaction after each insert still I get duplicate records. Does any one have any idea?

Thanks
JJ
Reply With Quote
  #2 (permalink)  
Old 10-13-09, 13:55
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
This is not a database issue. DB2 just does what the applicaton tell it to do.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 10-13-09, 14:21
jjagarwal jjagarwal is offline
Registered User
 
Join Date: Oct 2009
Posts: 2
Thank you Marcus, since you are a DBA you know it better however I would like ask you if you have ever experienced it before? Can WebSphere App server make multiple insertions within micro seconds. Is commit after insertion not happening properly?
Reply With Quote
  #4 (permalink)  
Old 10-13-09, 14:40
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Inserts can be done very quickly. Commits are not going to make any difference here. As you mentioned, no PK constraints are being viloated.

There is either a bug in your client code or in the SP.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
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