Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: v_$session in 9.2
thank yo, but please read my posting further. I know, that it works with v_$
views -> v$views, but the procedure does not nevertheless works in
trigger!!!
"deepa balu via OracleMonster.com" <forum_at_OracleMonster.com> schrieb im
Newsbeitrag news:05bda320a4984d7f81f12be8ec9a8326_at_OracleMonster.com...
> 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.com
Received on Thu Dec 09 2004 - 07:43:08 CST
![]() |
![]() |