If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Issue with locks on SYSROUTINES

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-12-04, 11:11
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Question Issue with locks on SYSROUTINES

I am having a issue with locks being created on the SYSIBM.SYSROUTINES when executing a simple query that has a UDF or calls a system function. For example if I try:

select udf_name(last_name,first_name,middle_name,name_suf fix) from member where last_name like 'SMITH%' and first_name like 'J%' for read only

or

select last_name,first_name,middle_name,name_suffix from member where ucase(last_name) like 'SMITH%' and ucase(first_name) like 'J%' for read only

I will get an "Intention Share" lock on the sysroutines table and several "Share" locks on some rows within the table. The locks hang around until a Commit or Rollback. Our application only issue Commits and Rollbacks when work (inserts, updates, and deletes) is being performed. This means that these locks are almost always in place by at least one user constantly. Normally, this would not concern me too much, but it is impossible to create a UDF or Stored Procedure while these locks are in effect.

Can someone tell me why the locks are being issued on a "For Read Only" select statement and how to prevent the locks in the first place?

DB2 UDB 8.1.5 Linux Intel

Thanks,

Andy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On