Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: how to determine the osuser of a session
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
![]() |
![]() |