Re: Determining the program name from an after logon trigger

  • From: Amar Padhi <amar.padhi@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Fri, 27 Mar 2009 00:29:27 +0400

V$SESSION.PROGRAM is a good thing to look at but is not a reliable option.
For instance, I can change the name of sql*plus to "cranky" and connect to
database. What you will get in PROGRAM is "cranky"!

[oracle@amar scripts]$ cd $ORACLE_HOME/bin
[oracle@amar bin]$ cp -pv sqlplus cranky
`sqlplus' -> `cranky'
[oracle@amar bin]$ cranky /nolog
SQL> conn amar/****
Connected.
SQL> select program from v$session where sid = (select sid from v$mystat
where rownum = 1);

PROGRAM
------------------------------------------------
cranky@xxxxxxxxxxxxxxxxxxxx (TNS V1-V3)

And then there are time when the PROGRAM just has "???" that I have not yet
been able to identify why.


DBMS_APPLICATION_INFO is good option. This is infact also used by Oracle ERP
and it is easy to track which screen or responsibility the user is working
in at any given time. But then again, this only works for application call,
this cannot be forced on direct back-end calls.

If the quest is to find the exact client tool being used by a session, I
personally haven't come across a method that is perfect.

Thanks!
amar



On Fri, Mar 27, 2009 at 12:02 AM, Schauss, R. Peter (IT Solutions) <
peter.schauss@xxxxxxx> wrote:

>  This is a COTS package so I do not have access to the program.
>
> - Peter Schauss
>
>

-- 
Thanks!
Amar Kumar Padhi
Oracle DBA/Architect

Other related posts: