How to find all open/active connections in DB2 (8.x)

折月煮酒 提交于 2019-12-18 21:48:49

问题


I'm currently working with Db2 Enterprise Server V 8.2 with FixPak 10

And I want to retrieve list of all the open active connections with an instance.

In Oracle there is a utility program called "Top Session" which does the similar task. Is there any equivalent in DB2?

Thanks in advance, Kamal


回答1:


To get more detailed information from list applications:

db2 list applications for database {dbName} show detail

For applications with lots of active connections it is useful to pipe the results to grep to find only the threads currently executing or locked.

db2 list applications for database {dbName} show detail | grep -i "executing"

and

db2 list applications for database {dbName} show detail | grep -i "lock"



回答2:


CLP:

db2 list applications

QUERY:

SELECT * FROM SYSIBM.APPLICATIONS
SELECT * FROM SYSIBM.SESSION



回答3:


The command you seek is:

LIST APPLICATIONS

In the DB2 Command Center there is a tool which list the applications and displays them in a human friendly format as well.



来源:https://stackoverflow.com/questions/261512/how-to-find-all-open-active-connections-in-db2-8-x

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!