Re: Determining the program name from an after logon trigger

From: Amar Padhi <amar.padhi_at_gmail.com>
Date: Fri, 27 Mar 2009 00:29:27 +0400
Message-ID: <4064db340903261329o1ef759a8r9017af762dc1378b_at_mail.gmail.com>



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_at_amar scripts]$ cd $ORACLE_HOME/bin [oracle_at_amar bin]$ cp -pv sqlplus cranky `sqlplus' -> `cranky'
[oracle_at_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_at_amar.localdomain.com (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_at_ngc.com> wrote:

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

-- 
Thanks!
Amar Kumar Padhi
Oracle DBA/Architect

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Mar 26 2009 - 15:29:27 CDT

Original text of this message