Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Getting program name in PL/SQL procedure?

Re: Getting program name in PL/SQL procedure?

From: Vladimir M. Zakharychev <vladimir.zakharychev_at_gmail.com>
Date: 5 Oct 2006 09:40:15 -0700
Message-ID: <1160066415.024324.214070@m7g2000cwm.googlegroups.com>

Malcolm Dunnett wrote:
> I'd like to be able to get the program name that
> called a PL/SQL procedure ( the information that
> Enterprise Manager shows under the "Program"
> column of the sessions display ).
>
> I would have thought it was a SYS_CONTEXT
> item but I can't find a code that produces this
> information.
>
> Can anyone enlighten me on how to retrieve this
> information?

V$SESSION.PROGRAM has it. You need to filter on SID column to find out which program is connected to *your* session. You can obtain your session ID from V$MYSTAT view. If these views are unavailable, ask your DBA to grant select on them.

Hth,

    Vladimir M. Zakharychev
    N-Networks, makers of Dynamic PSP(tm)     http://www.dynamicpsp.com Received on Thu Oct 05 2006 - 11:40:15 CDT

Original text of this message

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