Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: sql trace - forward attribution

RE: sql trace - forward attribution

From: Boris Dali <>
Date: Tue, 06 Jan 2004 08:59:34 -0800
Message-ID: <>

Thanks to Anjo, Cary, Tanel, and everybody who provided feedback back channel.

Just to rule out the possibility of a collection error (somebody suggested that cursor #0 is simply not captured) I bounced the DB today, enabled a DB-wide trace ... and as expected

grep -i "cursor #0" *

returned nothing, while "wait #0" gives plenty. So it is not a trace activation/termination error.


I think what we deal with here is a "variant" of what
Anjo described, but not exactly that as I don't see 

*** SESSION ID:(sid.serial#) lines in the middle of
any trace file, only in the header, but I think it
still might be "session switching" of a kind.

What we use here is an n-tier proxy authentication and
I suspect these waits is the price we pay for it. Not
sure, but maybe if proxy attributes are "switched" sql
trace doesn't capture this properly, "forgeting" to
emit new session info? I would be interested to know
how to

1) confirm or refute this
2) since waits #0 appear only before the calls to a
stored code - I don't know if they deliberatly "switch
sessions" in the code that runs on the app server and
run the stored code as the schema owner (similar to
switching current schema as an alternative to using
synonyms) or it is a feature of Oracle's proxy
authentication implementation
3) how to check "proxy identity" of the user - i.e.
how to run something like sys_context('userenv',
'proxy_user') for sessions other than my own.

Boris Dali.

 --- Anjo Kolk <> wrote: > They write
all to the same trace file. So there

> should be different
> sid.serial# combinations.
______________________________________________________________________ Post your free ad now! -- Please see the official ORACLE-L FAQ: -- Author: Boris Dali INET: Fat City Network Services -- 858-538-5051 San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Received on Tue Jan 06 2004 - 10:59:34 CST

Original text of this message