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 -> Re: Monitor Queries

Re: Monitor Queries

From: <markp7832_at_my-deja.com>
Date: Sun, 06 Feb 2000 19:25:13 GMT
Message-ID: <87khql$5ep$1@nnrp1.deja.com>


In article <87k5dc$t6e$1_at_nnrp1.deja.com>,   muppetsrule_at_my-deja.com wrote:
> Is there a way to have Oracle log all queries that are run against the
> database, or maybe even run from a particular user? I need to do some
> verification of the queries, but I have not been able to find that
> information.
>
> Andy Schaefer
>

There is no command to log all queries in one nice neat file, but you can use the init.ora parameter sql_trace to trace every session for the database then you would have to use tkprof to format every session so you could examine the results. Depending on you system load this can produce a lot of output files that can consume significant space.

You can use the alter session command to turn tracing on for a specific session or job but only from within the task. To trace an already running session you can use the dbms_system.set_sql_trace_in_session procedure. See v$session for the sid and serial# columns to feed the procedure.

Lastly though I do not think it really applies to your question you might want to look at the Audit command if there is a specific user you are interested in observing for security type reasons.

--
Mark D. Powell -- The only advice that counts is the advice that  you follow so follow your own advice --

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sun Feb 06 2000 - 13:25:13 CST

Original text of this message

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