Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Trigger after insert

Re: Trigger after insert

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Thu, 21 Aug 2003 21:25:30 +0200
Message-ID: <k07akvsot38q2gbggo05cj1nda64j7sekh@4ax.com>


On 21 Aug 2003 06:04:38 -0700, sylvain.ricaud_at_wunderman-i.com (Sylvain) wrote:

>Hi,
>
>i got 2 tables which are linked thanks to a database link.
>those tables have the same fields.
>
>everytime data are inserted in the first one, i'd like those data to
>be inserted in the second table.
>
>i've created the following trigger :
>
>CREATE TRIGGER "DBUSER".INSERT_DATA AFTER INSERT ON "DBUSER"."TABLE1"
>REFERENCING OLD AS old NEW AS new
>FOR EACH ROW
>begin
>insert into table2_at_dblink(field1,field2,field3,field4) values
>(:new.field1,:new.field2,:new.field3,:new.field4);
>end;
>
>but that doesn't work.
>i got the following error :
>ORA-04098: trigger 'INSERT_DATA' is invalid and failed re-validation
>
>Does anybody have an idea ?
>
>Thanks

please run select * from user_errors where name = 'INSERT_DATA', or look up the error message for ora-4098.
Your trigger doesn't compile and you need to resolve the compilation problems you have (likely will get PLS-201, and you have privilege to the remote table through a *role*. The resolution for this has been posted over and over and over and over again.)

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Thu Aug 21 2003 - 14:25:30 CDT

Original text of this message

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