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: Logon trigger

Re: Logon trigger

From: Prem K Mehrotra <premmehrotra_at_hotmail.com>
Date: 23 Nov 2004 19:37:55 -0800
Message-ID: <43441e77.0411231937.6c49d9b3@posting.google.com>


fitzjarrell_at_cox.net (David Fitzjarrell) wrote in message news:<9711ade0.0411231519.574e38f_at_posting.google.com>...
> premmehrotra_at_hotmail.com (Prem K Mehrotra) wrote in message news:<43441e77.0411230711.1ecaec64_at_posting.google.com>...
> > I am writing a logon trigger to implement some Sarbanes Oxley
> > regulations.
> > Users may be connecting using listener:
> >
> > sqlplus scott/password_at_svcname
> >
> > or bypassing listener:
> >
> > sqlplus scott/password
> >
> >
> > Is there a way to distinguish the two in logon trigger. I know in
> > logon trigger one can get IP address, OS user etc, but how does one
> > distinguish between the two
> > cases.
> >
> >
> > Thanks a lot,
> >
> > Prem
>
>
> You might try this:
>
> sys_context('USER','TERMINAL')
>
> I know on my Sun box I get this for local connections:
>
> SQL> l
> 1 select sys_context('USER','TERMINAL')
> 2* from dual
> SQL> /
>
> SYS_CONTEXT('USER','TERMINAL')
> ----------------------------------------------
> pts/3
>
> SQL>
>
> And for remote connections I get this:
>
> SQL> select sys_context('USER','TERMINAL')
> 2 from dual;
>
> SYS_CONTEXT('USER','TERMINAL')
> -------------------------------------------------------
> DFMQ5T21
>
> SQL>
>
> Both are connected to the same instance, one locally, one through my XP Pro box.
>
> This might be a usable solution.
>
> David Fizjarrell

I tried this on HP UNIX 11i Oracle9.2.0.5. I did not find any difference in the two. I am wondering whethere there is anyway to set servicename from sys_contxt.

Prem Received on Tue Nov 23 2004 - 21:37:55 CST

Original text of this message

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