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: Find all SQLs run from one session

Re: Find all SQLs run from one session

From: Billy <vslabs_at_onwe.co.za>
Date: 22 Aug 2005 01:28:50 -0700
Message-ID: <1124699330.753880.110880@g44g2000cwa.googlegroups.com>


Randi W wrote:
> Is it possible by querying system tables to find all sql-statements that
> have been run from one session?

No. If a SQL handle has been closed by the client, then Oracle no longer has a reference to who owns a SQL statement in the shared pool.

You can only determine (via V$ views) what current SQL handles (open cursors) are owned by a session.

> What tables/views should I look into to find this?

V$OPEN_CURSOR contains the SID (Oracle session id - see V$SESSION) of who owns the ADDRESS and HASH VALUE (aka "SQL Address") of a SQL statement in the shared pool (see V$SQLTEXT for actual SQL text).

--
Billy
Received on Mon Aug 22 2005 - 03:28:50 CDT

Original text of this message

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