4 Replies Latest reply: Sep 7, 2011 6:01 AM by Philip Stoyanov-Oracle RSS

    How do I change the name of the auto generated trigger on the arc.

    user11377561
      How do I change the name of the auto generated trigger on the arc?

      I have 2 triggers that have been auto generated as below. I would like to change the names to conform to our naming standards.

      Thanks!
      Sabina

      CREATE OR REPLACE TRIGGER ARCI1_TMR_HISTOL
      BEFORE INSERT ON TMR_HISTOL
      FOR EACH ROW
      DECLARE i NUMBER;
      BEGIN
      i:=0;
      IF :new.HISTOL_VAR_KEY IS NOT NULL THEN
      i:= i+1;
      END IF;
      IF :new.HISTOL_KEY IS NOT NULL THEN
      i:= i+1;
      END IF;
      IF (i>1) THEN
      raise_application_error(-20223,' Arc constraint on table TMR_HISTOL is violated - one value is permitted in FKs');
      END IF;
      END;
      /

      CREATE OR REPLACE TRIGGER ARCU1_TMR_HISTOL
      BEFORE UPDATE OF HISTOL_VAR_KEY,HISTOL_KEY
      ON TMR_HISTOL
      FOR EACH ROW
      DECLARE i NUMBER;
      BEGIN
      i:=0;
      IF :new.HISTOL_VAR_KEY IS NOT NULL THEN
      i:= i+1;
      END IF;
      IF :new.HISTOL_KEY IS NOT NULL THEN
      i:= i+1;
      END IF;
      IF (i>1) THEN
      raise_application_error(-20223,' Arc constraint on table TMR_HISTOL is violated - one value is permitted in FKs');
      END IF;
      END;
        • 1. Re: How do I change the name of the auto generated trigger on the arc.
          Kent Graziano
          Philip? Anyone out there with any insight on this issue? I can't find a way to change it.
          • 2. Re: How do I change the name of the auto generated trigger on the arc.
            nsc
            Double-click on the arc, a Properties dialog will open, change the name, save, regenerate the DDL.

            Best regards.
            • 3. Re: How do I change the name of the auto generated trigger on the arc.
              user11377561
              This only changed the name of the arc. However, the name of the trigger does not change. The name of the auto generated trigger is : ARCI1_<Table Name>. The name of the arc is not included in the name of the trigger. I would like the trigger name to be <Table Name>_BIU1.  Is there a way for me to configure the name of this trigger?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
              • 4. Re: How do I change the name of the auto generated trigger on the arc.
                Philip Stoyanov-Oracle
                Hi,
                Is there a way for me to configure the name of this trigger
                No, I logged enhancement request for new naming template.

                Philip