Author |
Message
|
vids |
Posted: Wed Aug 27, 2003 4:23 pm Post subject: Do I need to use 2 phase commit???? |
|
|
 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 |
|
 |
bower5932 |
Posted: Thu Aug 28, 2003 7:19 am Post subject: |
|
|
 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 |
|
 |
vids |
Posted: Thu Aug 28, 2003 10:21 am Post subject: |
|
|
 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 |
|
 |
mrlinux |
Posted: Thu Aug 28, 2003 12:07 pm Post subject: |
|
|
 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 |
|
 |
vids |
Posted: Thu Aug 28, 2003 12:29 pm Post subject: |
|
|
 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 |
|
 |
leongor |
Posted: Sat Aug 30, 2003 10:46 pm Post subject: |
|
|
 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 |
|
 |
kirani |
Posted: Sun Aug 31, 2003 10:31 am Post subject: |
|
|
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 |
|
 |
vids |
Posted: Tue Sep 02, 2003 12:03 pm Post subject: |
|
|
 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 |
|
 |
|