Querying v$session from within a Stored Procedure
From: Rick Rimmer <rick.rimmer_at_shaw.ca>
Date: Thu, 17 Apr 2003 10:12:08 -0600
Message-ID: <xoAna.292$5M.14719_at_localhost>
[Quoted] I am writing a stored procedure with the following code within it:
from v$session v
where v.audsid = userenv('sessionid');
Date: Thu, 17 Apr 2003 10:12:08 -0600
Message-ID: <xoAna.292$5M.14719_at_localhost>
[Quoted] I am writing a stored procedure with the following code within it:
select v.osuser,
v.machine into sOSUser, sMachine
from v$session v
where v.audsid = userenv('sessionid');
and receive the following error when compiling:
PL/SQL: ORA-00942: table or view does not exist .
If I execute the SELECT statement in SQL*Plus (without the INTO clause) it works fine. I also tried the code in a function and within a package with the same result. Does anyone know what the problem could be?
I tried this on our Windows NT 8.1.7 and Windows NT 9.2 servers with the same outcome.
Thanks in advance,
Rick Rimmer
Received on Thu Apr 17 2003 - 18:12:08 CEST