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: Can a Trigger run at a fixed time

Re: Can a Trigger run at a fixed time

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Tue, 09 Dec 2003 14:15:33 -0800
Message-ID: <1071008166.57542@yasure>


Bricklen wrote:

> Sean Chang wrote:
>

>> How about put the time condition inside the trigger code, like
>>
>> create or replace trigger My_trigger
>>      after insert or delete or update of My_table
>>             for each row
>>       when (to_number(to_char(sysdate, 'HH24') ) not between 8 and 17)
>>   begin
>>
>> ---do somthing here
>> end;
>>
>>
>> "richard green" <green_24_at_hotmail.com> wrote in message
>> news:811617d5.0312081250.67ca893_at_posting.google.com...
>>
>>> Hi,
>>>  I want to do some insert/delete/update operations at 5 PM everyday.
>>> Is it possible to write a trigger that will do that. Or do I need to
>>> create a Stored Procedure which is invoked by a cron job?
>>>
>>> Thanx
>>> richard
>>
>>

>
> Maybe I'm having a mental lapse here, but isn't a trigger fired by an
> EVENT? I fail to see how it is reliable to have your trigger fire at
> specific times, if there is no event to cause the trigger to fire in the
> first place.
>
> That being said, it makes sense to just schedule these actions to occur
> at your desired point(s) in time using a SP and dbms_job.

Not only are triggers fired by events ... there is no way to cause a trigger to fire other than that triggering event.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Tue Dec 09 2003 - 16:15:33 CST

Original text of this message

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