Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Trigger Problem !
On Mon, 01 Jun 1998 22:16:23 -0400, Peter Cheung <petepat_at_aracnet.net> wrote:
> I created a table with the following trigger in Oracle 8.0.3 on a NT
>machine:
>
>CREATE OR REPLACE TRIGGER "BEF_ROW_UPDT_TS" BEFORE INSERT OR UPDATE OF
>"DESCRIPTION", "ID" ON "TTABLE" REFERENCING OLD AS OLD NEW AS NEW FOR
>EACH ROW BEGIN :new.LASTUPDTDATE:=SYSDATE;:new.REFCOUNTER:=
>:old.REFCOUNTER+1;
>END
>
>;
>
> However, when I tried to update the "DESCRIPTION" of "TTABLE", I
>received the following error message:
>
>SQLSTATE: S1000
>Native Error Code: 4098
>Driver Message: ORA-04098 'BEF_ROW_UPDT_TS' is invalid and failed
>re-validation.
>
> I could not figure out what went wrong ? Please help. Thx.
Your trigger has probably not compiled propperly and is therefore invalid. You can verify this with:
SELECT object_name, status FROM user_objects WHERE object_name = 'BEF_ROW_UPDT_TS' AND object_type = 'TRIGGER';
If the status is reported as being 'INVALID' then you must check your trigger source code (perhaps some of the table columns are misspelled?). If you compile your trigger from within SQL*Plus, then after compilation execute the following to show errors:
SHOW ERRORS TRIGGER bef_row_updt_ts
Ragards,
Jurij Modic Republic of Slovenia jurij.modic_at_mf.sigov.mail.si Ministry of Finance ============================================================The above opinions are mine and do not represent any official standpoints of my employer Received on Tue Jun 02 1998 - 00:00:00 CDT
![]() |
![]() |