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: USERENV('SESSION_ID') / auditing

Re: USERENV('SESSION_ID') / auditing

From: Paul Berger <pberger_at_bergersoftware.com>
Date: Thu, 19 Nov 1998 22:41:13 -0500
Message-ID: <3654E4D9.EA430804@bergersoftware.com>


I would agree this is a bug or certainly inaccurate within the documentation...at least as it pertains to Oracle7 7.3.x

As an aside: When utilizing userenv('sessionid') the value returned by this built-in actually matches the 'audsid' column within the v$session view...most of the time. The exceptions appears to be with Oracle system processes and when a session executes a PL/SQL object via Oracle's dbms_jobs. Userenv('sessionid') then registers an 'audsid' of 0, unfortunately. We wrote an error handler that exploits this association between userenv('sessionid') and v$session.audsid only to find this dbms_jobs restriction.

Oracle will give you a unique session id via a call to one of the dbms built-ins...unique_session_id...but there appears to be no relationship back to any of the columns within any of the v$ views. Hence it's of limited use.

As a proposal if userenv('SID') returned the unique 'sid' within v$session simply, without qualification, that would be nice.

Thomas Kyte wrote:

> the documentation is wrong in this case. I opened a doc bug yesterday after
> seeing this, bug #765506. Hopefully ,it will get updated in the next release of
> the documentation...
>

... Received on Thu Nov 19 1998 - 21:41:13 CST

Original text of this message

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