Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: how to determine the osuser of a session

Re: how to determine the osuser of a session

From: Billy <vslabs_at_onwe.co.za>
Date: 21 Jun 2005 03:37:26 -0700
Message-ID: <1119350246.317370.26340@o13g2000cwo.googlegroups.com>


Andreas Mosmann wrote:

> this I know, but which is the session that the program is using?

SELECT sid FROM v$mystats WHERE rownum = 1

Best is to wrap this into a SYS function using AUTHID definer and provide execute access on the function. That way you do not need to start granting access to V$ virtual views to public, and you have a single logical point for application PL/SQL code to get their session id from.

--
Billy
PS. apologies for the prior incorrect posting - slippery mouse trigger
finger.
Received on Tue Jun 21 2005 - 05:37:26 CDT

Original text of this message

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