By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,237 Members | 1,256 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,237 IT Pros & Developers. It's quick & easy.

Queries against a table

P: n/a
Jay
I have a DB2 UDB database on an AIX UNIX machine. I would like to know
the queries running against certain tables. There are some applications
outside of the database that do read and update these tables. Some have
incorrect isolation levels that end up locking the tables. How can I
find out what queries are running against a table, and how can I kill
them. This is a development environment and I would hate to bother the
DBA to fix these things. Sometime back the DBA has mentioned to me that
he will give the users access to see these things. I just didnt know
how.
Appreciate your help.
Thanks.
Jay

Sep 25 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Jay wrote:
I have a DB2 UDB database on an AIX UNIX machine. I would like to know
the queries running against certain tables. There are some applications
outside of the database that do read and update these tables. Some have
incorrect isolation levels that end up locking the tables. How can I
find out what queries are running against a table, and how can I kill
them. This is a development environment and I would hate to bother the
DBA to fix these things. Sometime back the DBA has mentioned to me that
he will give the users access to see these things. I just didnt know
how.
HE must have been talking about giving you SYSMON privileges so you can
use snapshot table functions.
The easiest way. The easiest way to find out which query goes against
which table is to dump the statement cache and grep for the table names.
You can perform more elaborate schemes. But I'd start there.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Sep 25 '06 #2

P: n/a
"Serge Rielau" <sr*****@ca.ibm.comwrote in message
news:4n************@individual.net...
HE must have been talking about giving you SYSMON privileges so you can
use snapshot table functions.
The easiest way. The easiest way to find out which query goes against
which table is to dump the statement cache and grep for the table names.
You can perform more elaborate schemes. But I'd start there.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
I don't believe that you can kill (force) any offending applications with
SYSMON authority.
Sep 25 '06 #3

P: n/a
Mark A wrote:
"Serge Rielau" <sr*****@ca.ibm.comwrote in message
news:4n************@individual.net...
>HE must have been talking about giving you SYSMON privileges so you can
use snapshot table functions.
The easiest way. The easiest way to find out which query goes against
which table is to dump the statement cache and grep for the table names.
You can perform more elaborate schemes. But I'd start there.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

I don't believe that you can kill (force) any offending applications with
SYSMON authority.

No. But you got to find'em first.

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Sep 26 '06 #4

P: n/a
Jay
How would I do that in unix. I mean what is the command to run at the
unix prompt.
Thanks.

Mark A wrote:
"Serge Rielau" <sr*****@ca.ibm.comwrote in message
news:4n************@individual.net...
HE must have been talking about giving you SYSMON privileges so you can
use snapshot table functions.
The easiest way. The easiest way to find out which query goes against
which table is to dump the statement cache and grep for the table names.
You can perform more elaborate schemes. But I'd start there.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

I don't believe that you can kill (force) any offending applications with
SYSMON authority.
Sep 26 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.