Home » RDBMS Server » Server Administration » How to settle down ORA-04098 problem
How to settle down ORA-04098 problem [message #116525] Wed, 20 April 2005 09:04 Go to next message
GuteNacht
Messages: 16
Registered: April 2005
Junior Member
When I update the table "report_trigger", the trigger "MAO" should be triggered. But I came across the ORA-04098 problem: trigger MAO is invalid and failed re-validation.

How to settle this problem, please?

Thanks.

The trigger script is :

CREATE OR REPLACE TRIGGER mao
AFTER UPDATE OF updatetime
ON report_trigger
FOR EACH ROW
DECLARE
d_endtime report.endtime%TYPE;
d_today DATE;
BEGIN
SELECT endtime
INTO d_endtime
FROM report
WHERE id=:new.id;
d_today := SYSDATE ;

IF :new.id = 98 AND TRUNC(d_endtime) < TRUNC(d_today) THEN
daily13( d_endtime, d_today );
daily4( d_endtime, d_today );
daily5( d_endtime, d_today );
daily6( d_endtime, d_today );
wip_daily( d_endtime, d_today );
testdaily2( d_endtime, d_today );
END IF;

IF :new.id = 99 AND TO_CHAR(d_endtime,'MON') != TO_CHAR(d_today,'MON') THEN
monthly1( d_endtime, d_today );
monthly3( d_endtime, d_today );
monthly4( d_endtime, d_today );
monthly5( d_endtime, d_today );
END IF;

IF :new.id = 95 AND TRUNC(d_endtime) < TRUNC(d_today) THEN
UPDATE report
SET updatetime = d_today
WHERE id= 95;
wip_weekly( d_endtime, d_today );

END IF;

UPDATE report
SET bgtime = d_endtime, endtime = d_today
WHERE id=:new.id;

END mao;

Re: How to settle down ORA-04098 problem [message #116528 is a reply to message #116525] Wed, 20 April 2005 09:14 Go to previous messageGo to next message
Frank Naude
Messages: 4587
Registered: April 1998
Senior Member
Hi,

Compile the trigger, look at the compilation errors and fix them:

SQL> alter trigger MAO compile;

Trigger altered.

SQL> show errors trigger MAO
No errors.
SQL>



Best regards.

Frank
Re: How to settle down ORA-04098 problem [message #116544 is a reply to message #116528] Wed, 20 April 2005 10:16 Go to previous message
GuteNacht
Messages: 16
Registered: April 2005
Junior Member
I greatly appreciate it.

Regards

Norah
Previous Topic: Cloband BLoB
Next Topic: I need help as fast as possible
Goto Forum:
  


Current Time: Sun Jan 26 04:41:27 CST 2025