Re: want to monitor top 10 heavy sql statements to IDS server.
Posted in 2005
Guo,
I use this simple bit of script to show active queries by descending expense:
database sysmaster;
select first 15 sqx_estcost cost,
syssessions.username[1,10] User,
syssessions.tty[1,10],
sqx_iscurrent Crnt,
sqx_sessionid sid,TRIM(sqx_sqlstatement[1,25]) sql
from syssqexplain, syssessions
where sqx_iscurrent = 'Y'
where sqx_sessionid = syssessions.sid
and sqx_sessionid <> DBINFO('sessionid')
order by sqx_iscurrent desc, sqx_estcost desc;
Not very sophisticated, but effective enough for our purposes.
Dick Cunningham
Thurston County
>>> "Guo Dong Wan " <wanguod@cn.ibm.com> 10/24/05 5:30 PM >>>
Hello all,
We have one customer project, our customer would use tivoli to
monitor IDS server status, and they want to get the top 5 or top 10 heavy
sql statments per few minutes, as I think it should be some script to get
those information, from sysmaster database or other ways.
Anyone have them, or samples, Any ideas and suggestions ?
Thanks!
Best Regard!
Guo Dong Wan
Email: wanguod@cn.ibm.com