Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
432 views
in Technique[技术] by (71.8m points)

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...