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 > Informix > Lock Mode wait.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-21-03, 03:39
amit_kaps amit_kaps is offline
Registered User
 
Join Date: Nov 2003
Location: Pune, India
Posts: 22
Lock Mode wait.

Hi,
In case i want a thread to wait, i need to specify the same
using SET LOCK MODE TO WAIT <n>.

but this preference is retained only for that particulat session/connection.

Is there a way wherein i can specify the same as a global setting for my database itself?
__________________
Regards,
Amit.K.
Reply With Quote
  #2 (permalink)  
Old 11-21-03, 07:01
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Re: Lock Mode wait.

Quote:
Originally posted by amit_kaps
Hi,
In case i want a thread to wait, i need to specify the same
using SET LOCK MODE TO WAIT <n>.

but this preference is retained only for that particulat session/connection.

Is there a way wherein i can specify the same as a global setting for my database itself?
Hi,

The SET LOCK MODE TO WAIT <n> must by set in the aplication, by default is NOT WAIT.
Now, if this is imposible, maybe set lock mode first calling one SPL and set into.

Gustavo.
Reply With Quote
  #3 (permalink)  
Old 11-21-03, 09:38
amit_kaps amit_kaps is offline
Registered User
 
Join Date: Nov 2003
Location: Pune, India
Posts: 22
HI,
I am trying to avoid an additional database call from the application to set the wait, each time i neet to fire a query.
__________________
Regards,
Amit.K.
Reply With Quote
  #4 (permalink)  
Old 11-21-03, 09:39
amit_kaps amit_kaps is offline
Registered User
 
Join Date: Nov 2003
Location: Pune, India
Posts: 22
Hi,
An additional information -
I am using Informix Dynamic Server Ver. 9.30 FC2
__________________
Regards,
Amit.K.
Reply With Quote
  #5 (permalink)  
Old 11-21-03, 10:18
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Quote:
Originally posted by amit_kaps
Hi,
An additional information -
I am using Informix Dynamic Server Ver. 9.30 FC2
Hi Amit,

One question: The lock level of tables are page or row ?

Gustavo.
Reply With Quote
  #6 (permalink)  
Old 11-21-03, 13:08
fprose fprose is offline
Registered User
 
Join Date: Apr 2003
Location: Phoenix, AZ
Posts: 177
The SET LOCK MODE lasts for the session. You don't need to call it for each query.
__________________
Fred Prose
Reply With Quote
  #7 (permalink)  
Old 11-21-03, 14:02
amit_kaps amit_kaps is offline
Registered User
 
Join Date: Nov 2003
Location: Pune, India
Posts: 22
Hi Gustavo,
The lock mode is Row.
__________________
Regards,
Amit.K.
Reply With Quote
  #8 (permalink)  
Old 11-22-03, 14:33
amit_kaps amit_kaps is offline
Registered User
 
Join Date: Nov 2003
Location: Pune, India
Posts: 22
Hi Fred,
In my case the session are being managed by the Application server,
and i wouldn't know if the session is a new one or an older one(On which i have already fired SET LOCK MODE TO WAIT n).
__________________
Regards,
Amit.K.
Reply With Quote
  #9 (permalink)  
Old 12-05-03, 08:15
dubeda dubeda is offline
Registered User
 
Join Date: Dec 2003
Location: Argentina
Posts: 3
Lock Mode Wait

Hi,

I need to know what is the current value for Lock Mode Wait setting.

How can I do that ?

thanks
Reply With Quote
  #10 (permalink)  
Old 12-08-03, 15:23
amit_kaps amit_kaps is offline
Registered User
 
Join Date: Nov 2003
Location: Pune, India
Posts: 22
hi dubeda,

you can query the sysmaster database and check it out

for the specific table - select tabname, locklevel from systables
where tabname="<the table name>"
__________________
Regards,
Amit.K.
Reply With Quote
  #11 (permalink)  
Old 12-08-03, 16:25
fprose fprose is offline
Registered User
 
Join Date: Apr 2003
Location: Phoenix, AZ
Posts: 177
Each session on the app server would have had to have issued the connect sequence. we fire the "set lock mode to wait" immediately following the "connect".
__________________
Fred Prose
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