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 » About DB2 tables and LOCK

Post new topic  Reply to topic
 About DB2 tables and LOCK « View previous topic :: View next topic » 
Author Message
Testo
PostPosted: Mon Jul 26, 2004 1:36 am    Post subject: About DB2 tables and LOCK Reply with quote

Centurion

Joined: 26 Feb 2003
Posts: 120
Location: Italy - Milan

Two questions:

1. Is it possible to LOCK a DB2 table in a OS390 env from a message flow? If yes, what happens if the flow then gets an exception? Should I manage the UNLOCK from the catch path of the flow? I have this need because I'm trying to move some logic from a DB2 stored procedure to a WMQI 2.1 message flow; the DB2 SP contains this LOCK instruction and I'm wondering if I can use it in the flow as well...

2. What happens to a flow that is trying to perform a SEL/INS/UPD from a table that is currently locked? Does it get an exception immediately or does it wait for a timeout?

Thanks in advance for any hint,
Cheers,
Andrea Tedone
IBM IT Specialist
Back to top
View user's profile Send private message Send e-mail MSN Messenger
alexey
PostPosted: Mon Jul 26, 2004 4:33 am    Post subject: Reply with quote

Acolyte

Joined: 18 Dec 2003
Posts: 62
Location: Israel

Hi.

I did not try this on DB2 OS390, but I have tried it with SQL Server on W2K. If your flow is transactional (trans=YES on the MQInput) and the commit mode is automatic, the flow locks the table during the processing. After the flow ends, the tranaction released on the DB also. I've tested the opposite way too, and when the table is locked on the SQL Server, the flow waits to the lock to be relesed and than continues. I think there's some timeout on this wait, but I'm not sure if it can be configured.

Hope this helps.

Alexey.
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Jul 27, 2004 4:59 pm    Post subject: Reply with quote

Jedi Knight

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

I believe you can specify the timeout value on the DB side.
_________________
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
Testo
PostPosted: Mon Sep 27, 2004 1:19 am    Post subject: Some other considerations.... Reply with quote

Centurion

Joined: 26 Feb 2003
Posts: 120
Location: Italy - Milan

I will continue with this thread as my current issue is always related to DB2 and locks.

I have a transactional message flow where I would like to get a lock on a specific table and for a specific record since the beginning of the flow, even if the update of that record will occur later in the flow (i.e. some milliseconds after) and not for sure - the update is under some conditions.

To obtain this result, a DB expert told me that I could perform, in the very first compute node, a 'SELECT * FROM <table> WHERE <conditions> FOR UPDATE OF <columnname>; in this manner, the record should be locked until the commit.

My question is: what happens if I don't execute the update on that column? Is the end of the flow considered as a commit? And what happens if I do execute the update but on other columns or in that columns together with other ones?

Thanks in advance for any suggestion,
Cheers
Andrea Tedone
IBM IT Specialist
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » About DB2 tables and LOCK
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.