ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem with "Commit" in esql

Post new topic  Reply to topic
 Problem with "Commit" in esql « View previous topic :: View next topic » 
Author Message
Deepali
PostPosted: Wed May 29, 2013 1:14 am    Post subject: Problem with "Commit" in esql Reply with quote

Novice

Joined: 05 Mar 2013
Posts: 19

Hi All,
We are using WMB V8 and DB2. In our message flow we are inserting ~1000 rows in compute node. We want to commit after every 50 inserts. We tried with transaction property set to"commit". It's not working. Also we tried PASSTHRU 'commit'. But no use!
Can anybody help us?
Back to top
View user's profile Send private message
Tech1621
PostPosted: Wed May 29, 2013 2:00 am    Post subject: Re: Problem with "Commit" in esql Reply with quote

Novice

Joined: 29 May 2013
Posts: 23

Deepali wrote:
Hi All,
We are using WMB V8 and DB2. In our message flow we are inserting ~1000 rows in compute node. We want to commit after every 50 inserts. We tried with transaction property set to"commit". It's not working. Also we tried PASSTHRU 'commit'. But no use!
Can anybody help us?




I have some questions ,
1)Are you using PROPAGATE statement?
That can be the problem with the transaction
look :
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac17030_.htm&resultof=%22commit%22


2) Is none of the tables being inserted in the DB?
_________________
Anything is easy if you believe in yourself..
Back to top
View user's profile Send private message
Deepali
PostPosted: Wed May 29, 2013 2:07 am    Post subject: Reply with quote

Novice

Joined: 05 Mar 2013
Posts: 19

Thanks for reply..
We are not using PROPAGATE. And we are inserting in one table only. But not a single row is getting inserted. (We have tested it without commit. Rows are getting inserted.) Now we want to try with 'commit'.
Back to top
View user's profile Send private message
Esa
PostPosted: Wed May 29, 2013 2:09 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Make a transactional preprocessor flow split the message into 50 record parts and send the messages to the database flow via an intermediate queue. Ande let the database flow commit transcationally. Don't try to commit programmatically.

Because you don't want to have the 1000 record message backed out and you not knowing which records were committed and which not.
Back to top
View user's profile Send private message
Tech1621
PostPosted: Wed May 29, 2013 2:18 am    Post subject: Re Reply with quote

Novice

Joined: 29 May 2013
Posts: 23

Deepali wrote:
Thanks for reply..
We are not using PROPAGATE. And we are inserting in one table only. But not a single row is getting inserted. (We have tested it without commit. Rows are getting inserted.) Now we want to try with 'commit'.


I can not understand the use of commit as even if the transition mode is Automatic and you are able to insert the table to the DB , if the message flow completes successfully, the updates are committed.

Is it only by changing the transition mode from Automatic to commit you are not able to get the tables inserted?
_________________
Anything is easy if you believe in yourself..
Back to top
View user's profile Send private message
kash3338
PostPosted: Wed May 29, 2013 2:36 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

One approach is to use Stored Procedures to do this for you. You can have the logic of "Commit" in your Stored Procedure.

But the design suggested by Esa would be the best one I guess. Because its always better to "Commit" transactionally than through your code (as pointed out).

But why do you want to commit for every 50 records?
Back to top
View user's profile Send private message Send e-mail
Esa
PostPosted: Wed May 29, 2013 3:28 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Deepali wrote:
But not a single row is getting inserted. (We have tested it without commit. Rows are getting inserted.) Now we want to try with 'commit'.

I think trying to commit programmatically (with PASSTHRU) causes an exception and that is the reason why now rows get inserted.
Do you have exception handling in your flow? Can you tell if you get an exception?
Back to top
View user's profile Send private message
Deepali
PostPosted: Wed May 29, 2013 4:52 am    Post subject: Reply with quote

Novice

Joined: 05 Mar 2013
Posts: 19

Thanks All for the reply.
We had given wrong Data Source Name in property of compute node. The flow is working fine.
We have tested all the scenarios of committing database inserts.
@Esa : Trying to commit programmatically (with PASSTHRU) does not cause any exception. We tried it!!
Also if you set Transaction property of compute node to commit, the inserts are not getting rolled back if any exception occurs in the flow later.
Back to top
View user's profile Send private message
Esa
PostPosted: Wed May 29, 2013 5:02 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Deepali wrote:

@Esa : Trying to commit programmatically (with PASSTHRU) does not cause any exception. We tried it!!

Thanks for the information.
Deepali wrote:

Also if you set Transaction property of compute node to commit, the inserts are not getting rolled back if any exception occurs in the flow later.

And you are sure this is worth a ?
What do you do with the records that were not committed?
Back to top
View user's profile Send private message
shrutiagarwal228
PostPosted: Mon Jan 20, 2014 12:26 am    Post subject: Reply with quote

Newbie

Joined: 20 Jan 2014
Posts: 3

Deepali can you share the code you used for explicit commit.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem with "Commit" in esql
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.