Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help required for system database trigger
sybrandb_at_hccnet.nl schrieb am 09.04.2007 in
<v4ck13t8alv7fhmfj09ne0avlr0kp04rpq_at_4ax.com>:
> On 9 Apr 2007 04:22:31 -0700, "kishanthakker_at_gmail.com" > <kishanthakker_at_gmail.com> wrote:
>>
>> I will be highly obliged if any one can help me on
>>
>> Creating Database trigger for event of database login.
>>
>> We have Oracle9i Enterprise Edition Release 9.2.0.4.0 -
>> ported on Redhat Linux ES rel. 4.
>>
>> My SPECIFIC Requirement is
>>
>> I want to trap the 'log in' event which is NOT initiated by
>> Oracle forms, Oracle reports and Oracle Plsql.
>>
>> i.e. any 'login' other than these programs from windows98/windowsXP/
>> Windows2000 should be restricted.
>>
>> I am unable to find any database function which returns this program
>> names.
>>
>> some hint on the matter will really be helpful.
>>
>> Thanx in Advance
>>
>> Kishan Thakker
> convert the code to a stored procedure, owned by system, > and just issue > select program > from v$session where sid in (select sid from v$mystat) > or better still get the session sid from the sys_context function, and > you are there. > I would assume sys_context is capable of getting the program column > from v$session, but I leave it to you to look up the sys_context > function in the sql reference manual.
Additional: If a user has the role "DBA" the trigger will not be executed if user logs in. sys_context will help, but I do not know, what grant is to give to users for this.
Andreas Mosmann
-- wenn email, dann AndreasMosmann <bei> web <punkt> deReceived on Tue Apr 10 2007 - 02:00:08 CDT
![]() |
![]() |