questions about db2_pconnect and QSQSRVR job

General discussion on Zend Core for IBM System i

Re: questions about db2_pconnect and QSQSRVR job

Postby rangercairns on Mon Jan 31, 2011 6:26 pm

>>> Does db2_commit() have super-powers that autocommit does not?
Depends on isolation, but yes commit has powers, because autocommit is no-op unless INSERT/UPDATE/DELETE to record(s) have occurred, therefore more common SELECT(s) may create shared record read locks not affected by autocommit.
Last edited by rangercairns on Mon Apr 25, 2011 8:14 pm, edited 2 times in total.
rangercairns
 
Posts: 222
Joined: Fri Jul 24, 2009 6:28 pm

Re: questions about db2_pconnect and QSQSRVR job

Postby rangercairns on Mon Jan 31, 2011 6:48 pm

>> ... MSGW issue is not about db2_connect or db2_pconnect (... on box out of control by us ... )

Mmmm ... the real world is messy and unfair.
i am sure you already know, obviously a bad idea for a web site to call something (stored proc) that results in a operations message that a human has to handle, no offense intended, and your operator may be fast, but nobody is that fast with a 5250 screen.

So ...
Assuming said target machine cannot be touched by operator/programmer with operator auto-reply message, or new program monitor job to detect/correct condition, or fix "the bug" in the called stored procedure target (unfair to web programmers) ... hang appears likely in your future (persistent connection especially).

In this case, it would be handy to have some sort of ibm_db2 "detect / close" unresponsive "persistent" connection time out setting ... I will think about it -- chat with Alan / Zend guys / others.
Last edited by rangercairns on Mon Apr 25, 2011 8:15 pm, edited 1 time in total.
rangercairns
 
Posts: 222
Joined: Fri Jul 24, 2009 6:28 pm

Re: questions about db2_pconnect and QSQSRVR job

Postby aseiden on Mon Jan 31, 2011 8:57 pm

Tony,

Regarding superhero db2_commit() in pconnect mode, here's what I understood from your explanation. To make the rules easier to remember, I composed a poem. Let me know if it's correct.

Autocommit will complete
Each update and delete
But if SELECTs make *SHRRD locks (and you fear 'em),
Only db2_commit() will clear 'em.

Alan
aseiden
 
Posts: 872
Joined: Thu Apr 09, 2009 5:45 pm

Re: questions about db2_pconnect and QSQSRVR job

Postby rangercairns on Wed Feb 02, 2011 4:55 pm

Alan,
Nice ... also correct. Technically speaking, we should add insert, update and delete for all the SQL record state changers that autocommit supports, but that may spoil a perfectly good poem rhythm. Also, db2_free_result and db2_rollback would work.
PS -- Thanks for playing ... hopefully we are allowed "some" humor, tech messages can get dreadfully dull to read.
Last edited by rangercairns on Mon Apr 25, 2011 8:21 pm, edited 1 time in total.
rangercairns
 
Posts: 222
Joined: Fri Jul 24, 2009 6:28 pm

Re: questions about db2_pconnect and QSQSRVR job

Postby yiyujia on Wed Feb 02, 2011 5:05 pm

As a byproduct from this discussion, I learned both poems writing and detailed technical description. The discussion about auto commit is very useful for me! thanks Alan and Tony!
yiyujia
 
Posts: 59
Joined: Tue May 18, 2010 3:02 pm

Re: questions about db2_pconnect and QSQSRVR job

Postby aseiden on Wed Feb 02, 2011 6:06 pm

Tony, thanks for the clarification. Actually, the rhythm with "insert" is even better:

Autocommit will complete
Each insert, update and delete
But if SELECTs make *SHRRD locks (and you fear 'em),
Only db2_commit() will clear 'em.


I'm glad this was helpful for Yiyu as well.

Alan
aseiden
 
Posts: 872
Joined: Thu Apr 09, 2009 5:45 pm

Re: questions about db2_pconnect and QSQSRVR job

Postby yiyujia on Mon Mar 07, 2011 5:42 pm

Hi Tonny and Alan,

I saw a discussion about unreleased cursor in a As400 Java forum. From that, I learned a term called pseudo cursor close. Here is the link, http://wiki.midrange.com/index.php/SQL# ... t_18874457 .

I feel this could be insightful story of Alan's shared lock issue. Maybe it is better to have a configuration parameter in db2 connection extension to switch on/off this pseudo cursor close?

Yiyu Jia
yiyujia
 
Posts: 59
Joined: Tue May 18, 2010 3:02 pm

Previous

Return to Zend Core for i5/OS

Who is online

Users browsing this forum: No registered users and 2 guests