Connecting Tech Pros Worldwide Forums | Help | Site Map

IX lock not released

xixi
Guest
 
Posts: n/a
#1: Nov 12 '05
i am using type 4 driver with fp3 on windows 64bit server, auto commit
is true, cursor is CS type.

i have a sensitive , updatable cursor open and bring back a one row
resultset, i get this locklist

Lock Name = 0x020027011C0000000000000052
Lock Attributes = 0x00000000
Release Flags = 0x00000002
Lock Count = 1
Hold Count = 0
Lock Object Name = 28
Object Type = Row
Tablespace Name = USERSPACE1
Table Schema = xx
Table Name = xx
Mode = U

Lock Name = 0x02002701000000000000000054
Lock Attributes = 0x00000000
Release Flags = 0x00000003
Lock Count = 2
Hold Count = 2
Lock Object Name = 295
Object Type = Table
Tablespace Name = USERSPACE1
Table Schema = xx
Table Name = xx
Mode = IX

after that i will do update on this row, once the update statement
execute. statement.execute(sql), i still have a table IX lock there,
why the commit part not working? i have tried to explicitly call
conn.commit() still not help. but this will cause us problem since we
don't want to have IX lock stay after commit. Does this is the way
work on DB2?

Lock Name = 0x02002701000000000000000054
Lock Attributes = 0x00000000
Release Flags = 0x00000003
Lock Count = 2
Hold Count = 2
Lock Object Name = 295
Object Type = Table
Tablespace Name = USERSPACE1
Table Schema = xx
Table Name = xxx
Mode = IX

Fan Ruo Xin
Guest
 
Posts: n/a
#2: Nov 12 '05

re: IX lock not released


I don't use JDBC 2 feature.
Where can I find the definition of a sensitive cursor? Is it a scroll
cursor?
AFAIK, when using updatable cursor, you need turn off the autocommit,
otherwise you may lose the cursor handle.


xixi wrote:
[color=blue]
> i am using type 4 driver with fp3 on windows 64bit server, auto commit
> is true, cursor is CS type.
>
> i have a sensitive , updatable cursor open and bring back a one row
> resultset, i get this locklist
>
> Lock Name = 0x020027011C0000000000000052
> Lock Attributes = 0x00000000
> Release Flags = 0x00000002
> Lock Count = 1
> Hold Count = 0
> Lock Object Name = 28
> Object Type = Row
> Tablespace Name = USERSPACE1
> Table Schema = xx
> Table Name = xx
> Mode = U
>
> Lock Name = 0x02002701000000000000000054
> Lock Attributes = 0x00000000
> Release Flags = 0x00000003
> Lock Count = 2
> Hold Count = 2
> Lock Object Name = 295
> Object Type = Table
> Tablespace Name = USERSPACE1
> Table Schema = xx
> Table Name = xx
> Mode = IX
>
> after that i will do update on this row, once the update statement
> execute. statement.execute(sql), i still have a table IX lock there,
> why the commit part not working? i have tried to explicitly call
> conn.commit() still not help. but this will cause us problem since we
> don't want to have IX lock stay after commit. Does this is the way
> work on DB2?
>
> Lock Name = 0x02002701000000000000000054
> Lock Attributes = 0x00000000
> Release Flags = 0x00000003
> Lock Count = 2
> Hold Count = 2
> Lock Object Name = 295
> Object Type = Table
> Tablespace Name = USERSPACE1
> Table Schema = xx
> Table Name = xxx
> Mode = IX[/color]

Fan Ruo Xin
Guest
 
Posts: n/a
#3: Nov 12 '05

re: IX lock not released


WITH HOLD... WITH HOLD... WITH HOLD...

xixi wrote:
[color=blue]
> i am using type 4 driver with fp3 on windows 64bit server, auto commit
> is true, cursor is CS type.
>
> i have a sensitive , updatable cursor open and bring back a one row
> resultset, i get this locklist
>
> Lock Name = 0x020027011C0000000000000052
> Lock Attributes = 0x00000000
> Release Flags = 0x00000002
> Lock Count = 1
> Hold Count = 0
> Lock Object Name = 28
> Object Type = Row
> Tablespace Name = USERSPACE1
> Table Schema = xx
> Table Name = xx
> Mode = U
>
> Lock Name = 0x02002701000000000000000054
> Lock Attributes = 0x00000000
> Release Flags = 0x00000003
> Lock Count = 2
> Hold Count = 2
> Lock Object Name = 295
> Object Type = Table
> Tablespace Name = USERSPACE1
> Table Schema = xx
> Table Name = xx
> Mode = IX
>
> after that i will do update on this row, once the update statement
> execute. statement.execute(sql), i still have a table IX lock there,
> why the commit part not working? i have tried to explicitly call
> conn.commit() still not help. but this will cause us problem since we
> don't want to have IX lock stay after commit. Does this is the way
> work on DB2?
>
> Lock Name = 0x02002701000000000000000054
> Lock Attributes = 0x00000000
> Release Flags = 0x00000003
> Lock Count = 2
> Hold Count = 2
> Lock Object Name = 295
> Object Type = Table
> Tablespace Name = USERSPACE1
> Table Schema = xx
> Table Name = xxx
> Mode = IX[/color]

Closed Thread