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 » IBM MQ API Support » Do I need to use 2 phase commit????

Post new topic  Reply to topic
 Do I need to use 2 phase commit???? « View previous topic :: View next topic » 
Author Message
vids
PostPosted: Wed Aug 27, 2003 4:23 pm    Post subject: Do I need to use 2 phase commit???? Reply with quote

Acolyte

Joined: 24 Mar 2003
Posts: 68
Location: CA, USA

Hi ...

I 'm pulling the messages from the queue and inserting the record to sql server table using Visual Basic program.

I have set
GetOptions.Options = GetOptions.Options + MQGMO_SYNCPOINT

When I try to insert record...if there is any error, the record will not be inserted to the table and the control goes to errorHandler Label.

In error handler even if I don't give QMgr.Backout, the record will be rolled back. Also, if the message is successfully inserted to the table, without giving QMgr.Commit the message will be commited.

1. Do I need to use QMgr.Backout and QMgr.Commit???

2. If I use QMgr.Commit, After inserting the record to the table, is there
any chances of QMgr.Commit failing ??? If it fails, I may have to roll
back the database. Do I need to use 2 phase commit for this??
If yes, can anyone let me know the procedure to do 2 phase commit?

Thanks in advance

Thanks
Vij
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Aug 28, 2003 7:19 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

This sure sounds like a two-phase commit scenario. If you try to handle it yourself (ie, write the record and then see if you should do the commit to MQ), you could run into problems if something happens in the middle. You'll end up with a record and a message that didn't get committed.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
vids
PostPosted: Thu Aug 28, 2003 10:21 am    Post subject: Reply with quote

Acolyte

Joined: 24 Mar 2003
Posts: 68
Location: CA, USA

Thank you...

Right now I'm not using 2 phase commit. After inserting the record,
if the insert command is successful, I'm commiting the message.
It works fine. But as you said....it may give some problem.

Can anyone let me know how to do 2 phase commit with sql server???

Thanks
Vij
Back to top
View user's profile Send private message
mrlinux
PostPosted: Thu Aug 28, 2003 12:07 pm    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

IS SQL Server XA Compliant ???? if so then you can use MQSeries as the transaction coordinator if not you will need some form of coordinator.
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
vids
PostPosted: Thu Aug 28, 2003 12:29 pm    Post subject: Reply with quote

Acolyte

Joined: 24 Mar 2003
Posts: 68
Location: CA, USA

"Is SQL Server XA Compliant ????"

I'm new to sql server and Visual basic .So.... I'm not sure about it.
Can anyone answer this???

Thanks
Vij
Back to top
View user's profile Send private message
leongor
PostPosted: Sat Aug 30, 2003 10:46 pm    Post subject: Reply with quote

Master

Joined: 13 May 2002
Posts: 264
Location: Israel

Until now SQL Server was not XA compliant. I didn't check specifically about its last version.
_________________
Regards.
Leonid.

IBM Certified MQSeries Specialist.
Back to top
View user's profile Send private message
kirani
PostPosted: Sun Aug 31, 2003 10:31 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

I believe SQL Server is XA compliant, but I think the XA Interface is implemented differently, so MQSeries doesn't recognise SQL Server as XA compliant database. You could try using MTS to coordinate transactions between MQSeries and SQL Server.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
vids
PostPosted: Tue Sep 02, 2003 12:03 pm    Post subject: Reply with quote

Acolyte

Joined: 24 Mar 2003
Posts: 68
Location: CA, USA

Thank you....

Is there any documentation available which explains the procedure to use MTS to coordinate transactions between MQSeries and SQL Server??

Vij
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 » IBM MQ API Support » Do I need to use 2 phase commit????
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.