Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Polling SQL Queries
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