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 for special user

Re: logon trigger for special user

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Sat, 06 Nov 2004 05:19:57 -0800
Message-ID: <1099747129.664378@yasure>


Jeroen van den Broek wrote:

> DA Morgan wrote:
> 

>>Kitty wrote:
>>
>>
>>>I have to create a trigger which fires every time special users are
>>>connecting into database. When one of these users is connected, the
>>>trigger has to insert session_ID, date and table_name (name of the
>>>table, this special user is logged on) in a table named
>>>Log_on_table. My problem is that I don't know how to get the
>>>session_id and the table_name.
>>>
>>>CREATE OR REPLACE Trigger Log_on_Trigger
>>>AFTER LOGON Database
>>>Begin
>>> If (sys.login_user in (‘user1', ‘user2') then
>>> INSERT INTO Log_on_table (??session_ID??, sysdate,
>>>??table_name??)
>>> End If
>>>End
>>>
>>>I have not tested this code jet, so I don't know if it works
>>>correctly.
>>>
>>>Thanks for helping me!!!!
>>
>>http://www.psoug.org
>>click on Morgan's Library
>>click on DDL Triggers
>>click on System Triggers
> 
> 
> Daniël,
> 
> I don't know whether it makes much of a difference, but it might be 
> confusing:
> Both your DDL Triggers and your System Triggers page is labeled '10g', while 
> the index for both on the Morgan's Library page is labeled '9i'.
> 

Thanks. I'll fix that.

Anyone finding errors of commission or omission or wishing to post demos are welcome to submit them to the PSOUG.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Sat Nov 06 2004 - 07:19:57 CST

Original text of this message

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