|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to use MQSI db node to insert values into mutiple tbls |
« View previous topic :: View next topic » |
Author |
Message
|
narendra |
Posted: Fri Jun 07, 2002 7:59 am Post subject: How to use MQSI db node to insert values into mutiple tbls |
|
|
Apprentice
Joined: 04 Jun 2002 Posts: 26
|
I am using the MQSI database node to insert values into mutiple tables in the same database.
I would like to know the best method to make sure that all inserts have to be successfull before
final commit is done. Please kindly point me to the right documentation.
ENV:
MQ 5.2.1, MQSI 2.1 , DB2 7.2.5 all with latest fixpack on Wins2000
The target database is on an AIX box running AIX 4.3.3 and DB2 7.2.5
********* THIS IS WHAT THE DATABASE NODE HAS ******************************************
INSERT
INTO Database.DR.CONTACT (CONTACT_ID,ESTAB_ID,PERSON_ID,TITLE,BLOB_TEST)
VALUES (
Body.Message.CONTACT_ID,
Body.Message.ESTAB_ID,
Body.Message.PERSON_ID,
Body.Message.TITLE,
Body.Message.BLOB_TEST);
INSERT
INTO Database.DR.TEST1 (TEST1COL)
VALUES (
Body.Message.TEST1COL);
INSERT
INTO Database.DR.TEST2 (TEST2COL)
VALUES (
Body.Message.TEST2COL); |
|
Back to top |
|
 |
kirani |
Posted: Fri Jun 07, 2002 12:36 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Narendra,
What do you mean by "all inserts have to be successfull before final commit is done"?
If you want your Database updates to coordinate with MQSeries commit or rollback, you should use 2-phase commit. Your queue manager will act as transaction manager and your database manager will participate in global transaction as resource manager. You will have to configure your message flow to run in Coordinated Transaction mode. By default your transactions are broker coordinated.
In 2-phase commit, if any of your insert statement fails, DB rollback will take place automatically.
Hope this helps. _________________ 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 |
|
 |
dhaksr |
Posted: Fri Jun 07, 2002 12:40 pm Post subject: |
|
|
Apprentice
Joined: 20 Feb 2002 Posts: 37
|
To read more about "transaction Co-ordination" you may like to
refer to Administration guide and Intro and Planning Guide of WMQI.
Search for "Transaction" and you will find relevant topics. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|