Is it possible to "enable" auto-rollback functionality whiledead-lock occurred on DB2/400?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Laurence

    Is it possible to "enable" auto-rollback functionality whiledead-lock occurred on DB2/400?

    Hi,

    DB2/400 seems not able to auto-rollback one of transactions while
    dead-
    lock occurred.

    I called the procecure QSYS.CREATE_SQL _SAMPLE for creating sample
    database, and used ISQL (STRSQL) & Navigator (Run SQL Scripts) to
    evaluate it:

    Session A (Isolation Level = CS):
    1) insert into sampledb/staff values(1,'Ofer' ,1,'Mgr',0,0,0)
    3) select deptname from sampledb/department

    Session B (Isolation Level = CS):
    2) insert into sampledb/department values('1','Sys tem
    Monitor','00001 0','A00',NULL)
    4) select name from sampledb/staff

    The conclusion is:

    In ISQL, it shown CPF5027 (error code is 2) and QRY5050 (2 times); In
    Navigator, it shown CPF5027 (error code is 2, 2 times) and SQL0913.
    But, no rollback occurred on any transactions automatically.

    This behavior is not the same as the "open" db2 does.

    Is it possible to "enable" auto-rollback functionality while dead-lock
    occurred?

    Thanks in advance~
  • Laurence

    #2
    Re: Is it possible to "enable&qu ot; auto-rollback functionality whiledead-lock occurred on DB2/400?

    Supplementary:

    The session A and B both shown the error message without rolling back
    on one of transactions.

    As I re-did the step 3) and 4) the error message was threw again. I
    had to run SQL 'rollback' or 'commit' explicitly then the query just
    could done.

    Conversely, it will rollback one of transactions between session A, B
    in DB2 for LUW. That is why I said DB2/400 seems not able to auto-
    rollback one of transactions while dead-lock occurred.

    So, is DB2/400 possible to "enable" auto-rollback functionality while
    dead-lock occurred?


    Thanks in advance~

    Comment

    Working...