Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Polling SQL Queries

Polling SQL Queries

From: KJD <kjdama_at_yahoo.com>
Date: 12 Sep 2003 22:26:31 -0700
Message-ID: <8c907343.0309122126.4e7bb06b@posting.google.com>


I want to write a shell script as such

       sqlpeek dbname polling_interval max_interval

where polling_interval and max_intefrval are a # of seconds.

The script would monitor dbname by connecting to it every polling_interval
seconds for a maximum of max_interval seconds. The goal is to generate a report at the end to show which SQL queries appeared the most times.

My question is which view can show the active SQL queries being run by the server at the time the script is polling. I have looked at V$SQL and V$OPEN_CURSOR and they do not seem to be showing the current active SQL queries.

I think V$SQL shows all the parsed/cahced SQL and V$OPEN_CURSOR is always showing the same 155 rows. Received on Sat Sep 13 2003 - 00:26:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US