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: trigger question

Re: trigger question

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 04 Jun 1998 14:09:32 GMT
Message-ID: <3579aa2a.1982150@192.86.155.100>


A copy of this was sent to gennick_at_worldnet.att.net (Jonathan Gennick) (if that email address didn't require changing) On Thu, 04 Jun 1998 00:58:37 GMT, you wrote:

>On Wed, 03 Jun 1998 18:19:02 -0400, Igor Popov
><ipopov_at_solect.com> wrote:
>
>>I'm running oracle 7.3.4 and trying to create two identical triggers
>>with different names. Oracle returns error ORA-04090: 'tr1' specifies
>>same table, event and trigger time as 'tr2'. The same thing works
>>perfectly in 7.3.3, 7.2.X. Any ideas?
>
>I've run into this before myself. Other than setting
>COMPATIBLE to an earlier version (in your init file),
>there's no solution. You have to combine the two triggers
>into one.
>
>It's kind of a shame this isn't allowed anymore. Sometimes
>you have two triggers that are unrelated, and that you want
>to maintain seperately, but that you want to fire for the
>same event. Now you are forced to combine them.
>
>Jonathan

I think you might have that backwards -- the COMPATIBLE parameter is probably set too LOW (it must be 7.2 or higher), not too high in the init.ora parameter. Its still allowed -- its a feature added so that replication triggers won't prevent you from creating your own application triggers of the same type. Here is an example showing that it still works in 8.0.3 for example:

Connected to:
Oracle8 Enterprise Edition Release 8.0.3.0.0 - Production With the Partitioning and Objects options PL/SQL Release 8.0.3.0.0 - Production

SQL> create table t ( x int );

Table created.

SQL> create trigger t1_trigg
  2 before insert on t
  3 begin
  4 null;
  5 end;
  6 /

Trigger created.

SQL> create trigger t2_trigg
  2 before insert on t
  3 begin
  4 null;
  5 end;
  6 /

Trigger created.

So, make sure the compatible parameter in the init.ora file is set HIGH enough, not low enough...  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Thu Jun 04 1998 - 09:09:32 CDT

Original text of this message

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