Results 1 to 4 of 4

Thread: DB2 deadlock

  1. #1
    Join Date
    Apr 2002
    Posts
    84

    Question Unanswered: DB2 deadlock

    Dear All,

    We encountered this issue suddenly with the following error message:

    com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE -911, SQLSTATE: 40001, SQLERRMC: 68

    The application was working fine before. Could it due to the corruption of index on the tables. I'd appreciate if there is any hint.


    Thanks,
    qxz

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    This is not a deadlock, but a lock timeout. I would start with looking at the lock snapshot to determine what statements and database objects are involved.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Apr 2002
    Posts
    84
    Sorry that I am not a DBA. How to run the lock snapshot in DB2 8? Will it affect the performance of the database server?

    Thanks!


    Quote Originally Posted by n_i View Post
    This is not a deadlock, but a lock timeout. I would start with looking at the lock snapshot to determine what statements and database objects are involved.

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by qxz View Post
    Sorry that I am not a DBA.
    Some folks would see it as a good thing


    Quote Originally Posted by qxz View Post
    How to run the lock snapshot in DB2 8? Will it affect the performance of the database server?
    Log in to the server as the DB2 instance owner. Issue "db2 update monitor switches using lock on statement on uow on timestamp on". For locks, issue "db2 get snapshot for locks on <database name>". For statements, "db2 get snapshot for dynamic sql on <database name>". Take snapshots periodically, redirecting results to a text file, until you catch the lock wait that times out.

    Having snapshot monitor elements turned on does affect performance a little bit (general estimate is about 5% if all switches are on), but it's the only way to obtain diagnostic information.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

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