db2 locked table, how to find pid of blocking processs

https://stackoverflow.com/questions/20284424/db2-locked-table-how-to-find-pid-of-blocking-processs

I have little knowledge of db2 administration, and I can't figure out how to find the pid of the process locking the tab tables.

With db2top (screen "U"), I have the following table:

Agent        Application  Application    Object              Lock     Object     Lock       Lock  Is      Locked   Tablespace
Id(State)    Name         Status         Name                Mode     Type       Status     Count Blocker By       Name
------------ ------------ -------------- ------------------- -------- ---------- ---------- ----- ------- -------- -----------
     7060(l) xxxxxxxxxx   Lock Waiting   YYYY01.TABLEZZ      IS       Table      Granted        1      No     7974 USERSPACE1
     7060(l) xxxxxxxxxx   Lock Waiting   Internal Variation  S        Variation  Granted        1      No     7974 -
     7060(l) xxxxxxxxxx   Lock Waiting   YYYY01.TABLEZZ[0]   NS [X]   Row        -              -      No     7974 USERSPACE1
     7060(l) xxxxxxxxxx   Lock Waiting   Internal Plan       S        Plan       Granted        1      No     7974 -
     7974(l) xxxxxxxxxx   Lock Waiting   Internal Variation  S        Variation  Granted        1     Yes     8080 -
     7974(l) xxxxxxxxxx   Lock Waiting   YYYY01.TABLEZZ[0]   X [U]    Row        -              -     Yes     8080 USERSPACE1
     7974(l) xxxxxxxxxx   Lock Waiting   Internal Plan       S        Plan       Granted        1     Yes     8080 -
     7974(l) xxxxxxxxxx   Lock Waiting   YYYY01.TABLEZZ      IX       Table      Granted        1     Yes     8080 USERSPACE1

I have figured out that Agent 7974 is the blocking one. I'ld like to kill it and fix/test the bug. How can I figure out the pid of agent 7974 so I can attach a gdb to it?



If all you want to do is kill the agent, you can do it with db2 force application (7974). The client process ID is shown in db2top on the session screen (press l). You can also use db2pd -db <your database> -agents app=7974

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值