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: Session ID nonsense

Re: Session ID nonsense

From: Vsevolod Afanassiev <vafanassiev_at_westpac.com.au>
Date: Fri, 15 Oct 1999 11:32:46 +1000
Message-ID: <7u608d$g8m9@xlprod01.westpac.com.au>


Alex,
To get SID of the current session, use
SELECT distinct SID FROM V$MYSTAT;

Regards,
Vsevolod

AleX wrote in message <7u5ok1$eff$1_at_nnrp1.deja.com>...
>I have seen a very strange situation. I'm on 8.0.5.1 on Sequent. I have
>a trigger which extracts osuser name for each insert or update. The SQL
>looks like this:
>
>select osuser
> into v_osuser
> from v$session
> where audsid = USERENV('SESSIONID');
>
>However, when a job runs (owned by an account different from the
>table/trigger owner), it runs a procedure which inserts a row into the
>table and it gets ora-1422 error. When I run the procedure from sqlplus
>I never get this error. So that means that the SNP process uses a
>different osuser name for the same session id??? So a session id can be
>shared for 2 different users? Any ideas?
>
>--
> Alex Shterenberg
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Thu Oct 14 1999 - 20:32:46 CDT

Original text of this message

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