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 can a PL/SQL identify itself?

Re: how can a PL/SQL identify itself?

From: Frank Piron <empty_at_zero.nil>
Date: Fri, 21 Jan 2005 08:44:01 +0100
Message-ID: <opskxzrnapm0et4w@news.online.de>


Am 20 Jan 2005 09:29:33 -0800 schrieb Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>:

> bidon70 (bidon70_at_hotmail.com) wrote:
> : Hello everybody,
>
> : I have browsed through the posts but I could not find any problem
> : similar to mine, so I would like to ask you this question:
> : is there a way to uniquely identify a running PL/SQL program (via the
> : V$ views, sys_context, etc.)?
> : I would like to get a unique identifier for a particular instance of a
> : program running and the identifier should be retrieved by the PL/SQL
> : itself.
> : I have tried with v$SESSION and V$PROCESS but it seems they do not
> : contain this kind of info.
>
> What is wrong with the session id?
>
> select userenv('sessionid') from dual ;

I think the OP likes to identify a special PL/SQL program (-module) rather than only the session context.
So he or she has to use DBMS_APPLICATION_INFO() to set module, action or client_info and than request the information by querying V$SQLAREA or calling DBMS_APPLICATION_INFO.READ_MODULE().

Regards

-- 
Frank Piron,
defrankatkonaddot
(leftrotate two)
Received on Fri Jan 21 2005 - 01:44:01 CST

Original text of this message

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