Home » SQL & PL/SQL » SQL & PL/SQL » ORA-06512 & ORA-04088 error message but my trigger compiles without errors!?
ORA-06512 & ORA-04088 error message but my trigger compiles without errors!? [message #28660] Wed, 14 January 2004 00:48 Go to next message
Patrick Tahiri
Messages: 119
Registered: January 2004
Senior Member
Hi,

I'm working with Oracle 8i Release 8.1.7.2.0...

I have compiled a "simple" trigger without receiving any errors during compilation (compiled successfully!). But when I provoque the trigger to fire I receive my custom error message which is correct (raise_application_error) BUT I do receive also these two errors:

ORA-06512: at "STAT.CPAP_MASTER_CONTENT_COST-TRG"

ORA-04088: error during execution of trigger: "STAT.CPAP_MASTER_CONTENT_COST-TRG"

Could someone please tell me why? What does these combined ORA messages define and mean?

What can I do to avoid or repare thes kind of errors?

Here is my trigger:


CREATE
OR REPLACE TRIGGER CPAP_MASTER_CONTENT_COST_TRG
BEFORE INSERT OR UPDATE ON stat.CPAP_MASTER_CONTENT_COST
FOR EACH ROW

DECLARE
v_cc_id NUMBER;

BEGIN

IF ((UPDATING OR INSERTING) AND :NEW.COUNTRY_CODE = -1)
THEN

SELECT count(*) INTO v_cc_id FROM stat.CPAP_CONTENT_COST
WHERE CONTENT_CUSTOMER_ID = :NEW.CONTENT_CUSTOMER_ID
AND LEVEL_ID = :NEW.LEVEL_ID
AND LEVEL_ID2 = :NEW.LEVEL_ID2
AND LEVEL_TYPE = :NEW.LEVEL_TYPE
AND PERIOD_START = :NEW.PERIOD_START
AND RATE_IS_FIXED_VALUE = :NEW.RATE_IS_FIXED_VALUE
AND RATE = :NEW.RATE;

IF (v_cc_id != 0)
THEN

raise_application_error(-20000,'Custom Error');
END IF;
END IF;

END CPAP_MASTER_CONTENT_COST_TRG;

Thank you very much for your tips!

Best regards,

Patrick.
Re: ORA-06512 & ORA-04088 error message but my trigger compiles without errors!? [message #28665 is a reply to message #28660] Wed, 14 January 2004 08:20 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
That is the expected error stack in this case - first your 20000, then the 6512 as the error stack is unwound, then the 4088 indicating a runtime error in the trigger (due to the original exception).
Re: ORA-06512 & ORA-04088 error message but my trigger compiles without errors!? [message #28672 is a reply to message #28665] Wed, 14 January 2004 21:50 Go to previous message
Patrick Tahiri
Messages: 119
Registered: January 2004
Senior Member
Thank you very much for your answer!!

Regards,

Patrick Tahiri.
Previous Topic: COPY Command
Next Topic: Is numeric ?
Goto Forum:
  


Current Time: Wed Aug 06 01:33:26 CDT 2025