Re: Current Session Identifier
From: Vikram Goel <vgoel_at_pts.mot.com>
Date: 1996/06/13
Message-ID: <4ppq86$b01_at_lserv1.paging.mot.com>#1/1
Date: 1996/06/13
Message-ID: <4ppq86$b01_at_lserv1.paging.mot.com>#1/1
Jim,
Please refer to my email regarding this. In a nutshell, the sessionid will always give the correct results, while audsid may not, depending on the client side sqlnet version and/or os.
-- Vikram Goel Motorola email: vgoel_at_pts.mot.com Sr. Oracle DBA - Consultant Aerotek Inc. My email: vgoel_at_emi.net Motorola Info: Mail Stop 39, Room S1014 1500 Gateway Blvd, Boynton Beach, FL 33426 In article <4p9d11$1oa_at_news2.tds.net>, James Peterson <james.peterson_at_teldta.com> writes:Received on Thu Jun 13 1996 - 00:00:00 CEST
>Hi,
>I think this is not quite correct. userenv('SESSIONID') does return a
>session id for auditing purposes but this is not the same sid as is
>stored in v$session. However a variation may be closer.
>select sid
>from v$session
>where terminal = userenv('TERMINAL');
>This returns an accurate sid in my environment. The SQL Language
>Reference says it will behave differently for a distributed SQL
>statement. I have not tried that.
>You have to also consider how unique an identifier TERMINAL is. I assume
>that if your process is running in the background this will not return
>useful results.
>Jim Peterson
>TDS Computing Services
>Madison, WI USA
>james.peterson_at_teldta.com
