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 > Question on Lock

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-01-09, 12:39
rvsenthil rvsenthil is offline
Registered User
 
Join Date: Mar 2009
Posts: 22
Question on Lock

Our application is running on Informix 10. In application, we are not executing any separate lock on table. But, It is putting lock on a table.

My onstat -k sample output:-

c000000004a20960 0 c00000017fff04e0 c000000017b4d460 IX a00001 0 0
c000000004a20b40 0 c00000017fff04e0 c000000017b51fd8 HDR+IX 7800001 0 0

In any scenario, IDS put lock on a table? onstat -k output shows that, It has created lock on table.

Please advice me.
Reply With Quote
  #2 (permalink)  
Old 04-02-09, 07:21
mallik2004 mallik2004 is offline
Registered User
 
Join Date: Sep 2008
Posts: 33
Hi Sentil,

What is your problem?Are you running short of locks? or Do You wanna know how database server use locks.

Regards-Mallik
Reply With Quote
  #3 (permalink)  
Old 04-02-09, 09:44
rvsenthil rvsenthil is offline
Registered User
 
Join Date: Mar 2009
Posts: 22
when i am running application, it is putting table level lock on some tables. But, I couldn't find the tblsnum for those tables. I checked in all the databases "sysfragments and systables" tables.

I am not executing any statement like " lock table in exclusive mode". But, why it is generating exclusive on some tables?

Thanks...
Reply With Quote
  #4 (permalink)  
Old 04-02-09, 17:54
stanislav.ondac stanislav.ondac is offline
Registered User
 
Join Date: Aug 2005
Posts: 140
to find out table name try:

Code:
select tabname from systables
where hex(partnum) matches upper("*c000000017b4d460*")
And you don't have to put separate locks on the table.
Locks you are seeing are intent locks. Intent locks are special kinds of locks and are handled by database server. You can't control them. If you update for example one row, the database server puts exclusive lock on this row or page(depends on table locking ) and also puts intent exclusive lock on the whole table to ensure that no other sessions can put locks on this table.

When you end your transaction or close session, these locks should disappear.
Reply With Quote
  #5 (permalink)  
Old 04-03-09, 07:22
rvsenthil rvsenthil is offline
Registered User
 
Join Date: Mar 2009
Posts: 22
Thanks for the reply. It always feels good to get an intelligent reply for a very good question.

When i was going through syslocks in sysmaster database, It has put exclusive lock on temporary dbspace.

dbsname ddj_temp_dbs8
tabname TBLSpace
rowidlk 0
keynum 0
type IX
owner 3890
waiter

dbsname ddj_temp_dbs3
tabname TBLSpace
rowidlk 0
keynum 0
type IX
owner 4104
waiter

dbsname ddj_temp_dbs5
tabname TBLSpace
rowidlk 0
keynum 0
type IX
owner 3882
waiter

dbsname ddj
tabname task_notification
rowidlk 0
keynum 0
type IX
owner 4021
waiter

dbsname ddj_temp_dbs6
tabname TBLSpace
rowidlk 0
keynum 0
type IX
owner 3882
waiter

dbsname ddj_temp_dbs8
tabname TBLSpace
rowidlk 0
keynum 0
type IX
owner 3882
waiter

Why is this happenning? Please revert back.
Reply With Quote
  #6 (permalink)  
Old 04-06-09, 08:23
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Jundiai / SP - Brasil
Posts: 311
This TBLSpace appear be Temporary tables .
Are ddj_temp_dbs* in DBSPACETEMP config?
This temp tables are created by user (CREATE TEMP TABLE) or automatically created in SQL with HASHs, SORTs, etc.
The easy way to identify is looking the first char on your tblspace/partnum :
a00001 = DBspace "0xA" = 10 = onstat -d : column dbspaces / number = 10
7800001 = DBspace "0x78" = 120 = onstat -d : number = 120

Tables like "task_notification" is part of sysadmin dbspace , don't worry about theys locks.
The sysadmin Database
__________________
________________________________________
César Inacio Martins
Jundiai / SP - Brasil
http://www.imartins.com.br/informix - em Português
http://www.imartins.com.br/informix - English (translated by Google).
________________________________________
Reply With Quote
  #7 (permalink)  
Old 04-06-09, 09:17
rvsenthil rvsenthil is offline
Registered User
 
Join Date: Mar 2009
Posts: 22
I got it.
Thanks a lot.
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