Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Missing entry in V$SESSION.PROGRAM
Package dbms_application_info only supports reading/writing module, action
and client_info columns of v$session, and module/action of v$sqlarea.
procedure set_module(module_name varchar2, action_name varchar2);
Sets both module and action name in one shot.
procedure set_action(action_name varchar2);
Sets just action name.
procedure set_client_info(client_info varchar2);
Sets client info portion.
Then there are the corresponding read procedures.
I set module upon entry to a packaged main application. I set action upon entry to every procedure used by such an application. I encapsulated this, and using PL/SQL tables as a stack, track entry and exit (upon exit of a subroutine resetting action to the calling context's name, stored on my "stack"; and exiting an application, do the same for module).
I'm running Oracle 8.0.3 (logged onto NT Server as Administrator and
connected to Oracle as sys) and this is what I get from v$session;
select osuser, program, module, action, client_info
from v$session
where osuser='Administrator';
OSUSER PROGRAM MODULE
--------------- -------------------- ------------- Administrator C:\WINNT\Profiles\Ad SQL*Plus ministrator\Desktop\ SQLPlus8.lnk
Michael Reiche Jakobsen <mrj_at_schilling.dk> wrote in article
<01bddccc$2236d5a0$1d0a010a_at_pc65-w95>...
> Hello,
>
> A lot of people have asked how to get entries in the V$SESSION.PROGRAM
> column. And always the answer have been: Look at the
DBMS_APPLICATION_INFO
> package. But this only give access to the V$SESSION.CLIENT_INFO column.
> This might do it for some. But since oracle's own binaries, and
> Visual-Basic sessions via ODBC, can report the name of program, there
must
> be a way to get my C-programs (using OCI) to do the same thing. I have
been
> looking through my OCI-reference, and seen no calls to implement this.
>
> Is the answer to this question such a big secret, or has anyone found a
> way?
>
>
> Michael Reiche Jakobsen
>
>
Received on Thu Sep 10 1998 - 17:03:18 CDT
![]() |
![]() |