Re: why is this trigger not working
Date: Fri, 20 Sep 2002 7:24:20 +0800
Message-ID: <0001HW.B9B07DA400020A3F1E13EC20_at_enews.newsguy.com>
On Thu, 19 Sep 2002 5:26:30 +0800, Rich D wrote (in message <196cd325.0209181326.3c6560f0_at_posting.google.com>):
> whenever i run this trigger in SQl Plus - nothing happens. I don't
> even get an indication that it failed to be created.
>
> But is this trigger ok for Oracle
>
>
> CREATE OR REPLACE TRIGGER UpdateInstance
> FOR UPDATE ON Survey_Instance
> AS
>
> DECLARE sp_Survey_instance_id int;
> sp_Survey_instance_id = SELECT Survey_instance_id FROM inserted;
> UPDATE Survey_Instance SET Survey_Instance.Update_datetime =
> SYSDATE WHERE Survey_Instance.Survey_instance_id =
> sp_Survey_instance_id;
> END;
use the dba oracle manager, then have a look at the trigger code, if it is
bad it will showup as "invalid" ,also be aware that the trigger will not
commit until your instance commits, so if you are not in the instance that
fires the trigger you will not see any changes until the instance that fires
the trigger commits.
finally you can:
- check the logs to see if any error is generated
- ensure the instance that fires the trigger has access to all the objects used.