Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2009
    Posts
    22

    Unanswered: 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.

  2. #2
    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

  3. #3
    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...

  4. #4
    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.

  5. #5
    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.

  6. #6
    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).
    ________________________________________

  7. #7
    Join Date
    Mar 2009
    Posts
    22
    I got it.
    Thanks a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •