real-time monitoring of SQL commands? 
Author Message
 real-time monitoring of SQL commands?
Hi Folks,

I'm running IDS.2000 9.20.UC1 on RH6.2. While my Java program is running
I'd
like a utility that lets me monitor the full/exact SQL commands that it
issues. Is there such a beast? I know of onstat -g sql -r 1, but it only
lists the *type* of command, not the whole thing. Plus, it can miss
commands
that come quickly. onperf didn't seem to have much. I haven't tried the
new
tool that requires a web server (jeez!) Thanks in advance.

matt



Wed, 18 Jun 1902 08:00:00 GMT
 real-time monitoring of SQL commands?

Try onstat -g sql {session id} -r 1

That actually lists the SQL statement itself.  To get better than 1 second
granularity, you need to run set explain on from within your program or a
stored procedure.  This puts every SQl command out to a sqexplain.out file.

Regards,

Ray


Quote:
> Hi Folks,

> I'm running IDS.2000 9.20.UC1 on RH6.2. While my Java program is running
> I'd
> like a utility that lets me monitor the full/exact SQL commands that it
> issues. Is there such a beast? I know of onstat -g sql -r 1, but it only
> lists the *type* of command, not the whole thing. Plus, it can miss
> commands
> that come quickly. onperf didn't seem to have much. I haven't tried the
> new
> tool that requires a web server (jeez!) Thanks in advance.

> matt



Wed, 18 Jun 1902 08:00:00 GMT
 real-time monitoring of SQL commands?
You need I-SPY

Go to www.informix.com and look under

Products
Tools

Quote:

>Hi Folks,

>I'm running IDS.2000 9.20.UC1 on RH6.2. While my Java program is running
>I'd
>like a utility that lets me monitor the full/exact SQL commands that it
>issues. Is there such a beast? I know of onstat -g sql -r 1, but it only
>lists the *type* of command, not the whole thing. Plus, it can miss
>commands
>that come quickly. onperf didn't seem to have much. I haven't tried the
>new
>tool that requires a web server (jeez!) Thanks in advance.

>matt



Sun, 27 Apr 2003 08:19:37 GMT
 real-time monitoring of SQL commands?


Quote:

>I'm running IDS.2000 9.20.UC1 on RH6.2. While my Java program is running
>I'd
>like a utility that lets me monitor the full/exact SQL commands that it
>issues. Is there such a beast? I know of onstat -g sql -r 1, but it only
>lists the *type* of command, not the whole thing. Plus, it can miss
>commands
>that come quickly. onperf didn't seem to have much. I haven't tried the
>new
>tool that requires a web server (jeez!) Thanks in advance.

Informix-SPY.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.



Wed, 18 Jun 1902 08:00:00 GMT
 real-time monitoring of SQL commands?
connect to sysmaster and check the syssqlstats table

savio

Quote:


> >I'm running IDS.2000 9.20.UC1 on RH6.2. While my Java program is running
> >I'd
> >like a utility that lets me monitor the full/exact SQL commands that it
> >issues. Is there such a beast? I know of onstat -g sql -r 1, but it only
> >lists the *type* of command, not the whole thing. Plus, it can miss
> >commands
> >that come quickly. onperf didn't seem to have much. I haven't tried the
> >new
> >tool that requires a web server (jeez!) Thanks in advance.

> Informix-SPY.
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

> Share information about yourself, create your own public profile at
> http://profiles.msn.com.



Wed, 18 Jun 1902 08:00:00 GMT
 real-time monitoring of SQL commands?
connect to sysmaster and check the syssqlstats table

savio

Quote:


> >I'm running IDS.2000 9.20.UC1 on RH6.2. While my Java program is running
> >I'd
> >like a utility that lets me monitor the full/exact SQL commands that it
> >issues. Is there such a beast? I know of onstat -g sql -r 1, but it only
> >lists the *type* of command, not the whole thing. Plus, it can miss
> >commands
> >that come quickly. onperf didn't seem to have much. I haven't tried the
> >new
> >tool that requires a web server (jeez!) Thanks in advance.

> Informix-SPY.
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

> Share information about yourself, create your own public profile at
> http://profiles.msn.com.



Wed, 18 Jun 1902 08:00:00 GMT
 real-time monitoring of SQL commands?
connect to sysmaster and check the syssqlstats table

savio

Quote:


> >I'm running IDS.2000 9.20.UC1 on RH6.2. While my Java program is running
> >I'd
> >like a utility that lets me monitor the full/exact SQL commands that it
> >issues. Is there such a beast? I know of onstat -g sql -r 1, but it only
> >lists the *type* of command, not the whole thing. Plus, it can miss
> >commands
> >that come quickly. onperf didn't seem to have much. I haven't tried the
> >new
> >tool that requires a web server (jeez!) Thanks in advance.

> Informix-SPY.
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

> Share information about yourself, create your own public profile at
> http://profiles.msn.com.



Wed, 18 Jun 1902 08:00:00 GMT
 real-time monitoring of SQL commands?
After determining the SessionId of the Java Program run "onstat -g sql
<session_id>". Tacking "-r 1" to the command repeats it every second (as
you know).  More detailed granularity can be obtained by placing it a
script that just keeps churning out the command without waiting.

e.g

#!/bin/ksh
SID=$1
integer REPETITIONS=$2
LOGFILE=$SID.log
integer i=0
while [ $i != $REPETITIONS ]; do
    onstat -g sql $1 >> $LOGFILE
    echo $i
    i=`expr $i + 1`
done

You could also buy the Informix Handbook available at
http://www.informixhandbook.com/ (Ron is going to love this!) and refer to
the chapter on Application Programming for a smarter (arguably, I'm sure)
script to extract SQL of a session.

Finally, you may want to consider sampling, taking snapshots of your Java
application's sql periodically and developing a "profile" over time - it
tends to be remarkably accurate for "live" use of an application.

Rudy

Quote:

> Hi Folks,

> I'm running IDS.2000 9.20.UC1 on RH6.2. While my Java program is running
> I'd
> like a utility that lets me monitor the full/exact SQL commands that it
> issues. Is there such a beast? I know of onstat -g sql -r 1, but it only
> lists the *type* of command, not the whole thing. Plus, it can miss
> commands
> that come quickly. onperf didn't seem to have much. I haven't tried the
> new
> tool that requires a web server (jeez!) Thanks in advance.

> matt



Wed, 18 Jun 1902 08:00:00 GMT
 real-time monitoring of SQL commands?

Thanks for the pointer. Looks like it doesn't run on Linux, and that
it costs $. :-(

matt



Wed, 18 Jun 1902 08:00:00 GMT
 real-time monitoring of SQL commands?


Quote:

>Thanks for the pointer. Looks like it doesn't run on Linux, and that
>it costs $. :-(

There's something free at http://www.iiug.org called inf_spy, I think.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.



Wed, 18 Jun 1902 08:00:00 GMT
 
 [ 10 post ] 

 Relevant Pages 

1. Monitor Your Analysis Services Deployment In Real Time.

2. Monitor your Analysis Services Deployment In Real Time.

3. Real time process monitor in Postgres

4. Real time process monitor in Postgres

5. Real-time monitoring tools for DBAs ?

6. Real-time monitoring tools for DBAs ?

7. Real-time monitoring tools for DBAs ?

8. Real-time business activity monitoring BAM

9. Real-time monitoring tools for DBAs ?

10. A real-life, real-time problem...

11. near real time data from DB2,SQL and Paradox needed on SQL box

12. How to monitor SQL commands sent to SQL Server


 
Powered by phpBB® Forum Software