Unix Technical Forum

Queries against a table

This is a discussion on Queries against a table within the DB2 forums, part of the Database Server Software category; --> I have a DB2 UDB database on an AIX UNIX machine. I would like to know the queries running ...


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 08:18 AM
Jay
 
Posts: n/a
Default Queries against a table

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 08:18 AM
Serge Rielau
 
Posts: n/a
Default Re: Queries against a table

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/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 08:18 AM
Mark A
 
Posts: n/a
Default Re: Queries against a table

"Serge Rielau" <srielau@ca.ibm.com> wrote in message
news:4nr28iFbm163U3@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.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 08:18 AM
Serge Rielau
 
Posts: n/a
Default Re: Queries against a table

Mark A wrote:
> "Serge Rielau" <srielau@ca.ibm.com> wrote in message
> news:4nr28iFbm163U3@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/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 08:19 AM
Jay
 
Posts: n/a
Default Re: Queries against a table

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" <srielau@ca.ibm.com> wrote in message
> news:4nr28iFbm163U3@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.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:21 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com