Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2009

    Unanswered: I need a LOCKLIST to see how many Locks Hold

    Hallo !
    I am a DB2 Beginner.
    My issue is, when i write in a table a error message appears:
    Error executing statement 'LOCK Table db2.table1 IN EXCLUSIVE MODE'.
    I need a tool or an other way to see some Snapshot on all applications.
    Then in those SNAPSHOTs, search for the "SELECT and INSERT" statements. I will get to see some more details, on how many Locks Hold, whether there was any EXCLUSIVE locks etc.



  2. #2
    Join Date
    Jan 2003
    Provided Answers: 5
    Go to the sticky note "Useful DB2 Stuff" and look for a link to a graphical snapshot monitor.

    What DB2 version and OS are you using? Why are you doing an exclusive table lock?


  3. #3
    Join Date
    Apr 2007
    For DB2 v9 you can try below scripts:
    Select substr(ai.appl_name,1,10) as Application,
    substr(ai.primary_auth_id,1,10) as AuthID,
    int(ap.locks_held) as "# Locks",
    int(ap.lock_escals) as "Escalations",
    int(ap.lock_timeouts) as "Lock Timeouts",
    int(ap.deadlocks) as "Deadlocks",
    int(ap.int_deadlock_rollbacks) as "Dlock Victim",
    substr(inbound_comm_address,1,15) as "IP Address"
    from sysibmadm.snapappl ap, sysibmadm.snapappl_info ai
    where ap.agent_id = ai.agent_id
    Eric Xu (许 昌)

  4. #4
    Join Date
    Jan 2009
    coolwinds ,REALLY GREAT SCRIPT...

Posting Permissions

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