Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: v_$session in 9.2
Try this
Instead of v_$ views use v$views
CREATE OR REPLACE function current_process return varchar2 is
Result varchar2(64);
begin
declare
my_sid number;
begin
result := NULL;
SELECT SID into my_sid from v$mystat where rownum=1;
SELECT PROGRAM INTO result from V$SESSION where SID=my_sid;
if result is NULL then
SELECT MODULE INTO result from V$SESSION where SID=my_sid;
end if;
return(Result);
exception
when others then NULL;
end;
end current_process;
/
-- Message posted via http://www.oraclemonster.comReceived on Thu Dec 09 2004 - 07:37:31 CST