Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to capture SQL
Joel Garry wrote:
> "Randy Harris" <randy_at_SpamFree.com> wrote in message news:<TrxUc.2712$ZC7.249_at_newssvr19.news.prodigy.com>...
>
>>Is there a simple means of capturing an SQL statement sent from an >>application to an Oracle 9i server (on the server end)? I've been looking >>through the documentation, not sure if this should be done with trace, or >>auditing or if there is some way to enable SQL logging, or dump the redo log >>or something else.
Better yet, under the "Tools...Diagnostics Pack" menu, right next to the choice Joel mentions, is another one: "Top SQL". This queries the v$sql* views (apparently) to list whatever is still in memory, whether it took a while to run or not, so if you have a relatively small set of queries that have run since startup, you can see quite a bit of history here (history in the sense of what has been executed, but not when or who). There are lots of filtering options too.
(I've occasionally wondered if clicking on this OEM menu on my workstation means I must be licensed for Diagnostics Pack...)
If the OP will indicate what the goal is (tuning, auditing, etc) some choices would stand out as better than others.
--Mark Bole Received on Thu Aug 19 2004 - 20:56:08 CDT