Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help required for system database trigger
On Apr 10, 8:37 pm, Andreas Mosmann <mosm..._at_expires-30-04-2007.news-
group.org> wrote:
> kishanthak..._at_gmail.com schrieb am 10.04.2007 in
> <1176201471.967815.242..._at_y5g2000hsa.googlegroups.com>:
>
> > On Apr 9, 5:29 pm, sybra..._at_hccnet.nl wrote:
> >> On 9 Apr 2007 04:22:31 -0700, "kishanthak..._at_gmail.com"
> > Dear Sybrand,
> > You are absolutely right. V$SESSION is not showing any thing in
> > 'PROGRAM' column.
> > Instead 'MODULE' column is showing some details like 'T.O.A.D.' in
> > case I 'log in' from TOAD.
> > but is not showing any name if I 'log in' from Form or Reports.
> > any suggestion ?
>
> As far as I remember you can ask for a special user_defined sys_context
> and you can set this too.
> So you could set a special SYS_CONTEXT in your application. All others
> will not do this and you can blog them in your trigger by
> begin
> SELECT sys_context('USERENV','YOUR_SPECIAL_CONTEXT') INTO TestIt FROM
> DUAL;
> IF not TestIt='MyApplication' THEN
> -- rais Exception, log it, whatever you want
> END IF
> END
>
> Andreas Mosmann
>
> --
> wenn email, dann AndreasMosmann <bei> web <punkt> de
It seems this approach is more practical. by setting sys_context it I can restrict the 'log on' from applications other than forms & reports then my problem will be solved.
Thanx Andreas, I may bother you again If I dont get any help on sys_context setting.
regards
Kishan Thakker Received on Thu Apr 12 2007 - 06:00:02 CDT