ORA-24344: Success with compilation error.
611110Nov 30 2007 — edited Dec 3 2007Hi, i got the following error notification mail when the DB job [runs only once in a day at 1 AM] tries to execute the following procedure.
The mail reads like this ----
"Condition Raised in: toll_partitions.recompile_invalid_objects
Short Desc: ORA-24344
Long Desc: ORA-24344: Success with compilation error.
Cause: Trigger creation did not successfully complete.
Solution: Check trigger status for all triggers created in this schema and find out which error caused the failure by querying the user_errors table for the named trigger and Trigger type.
"
--- end of mail ----
=== This is the procedure =====
PROCEDURE recompile_invalid_objects IS
-- Declare variables
v_ins_str VARCHAR2(2000);
cursor_handle NUMBER;
execute_feedback NUMBER;
v_unix_str VARCHAR2(200);
v_object_cnt NUMBER := 0;
-- Declare cursor objects
CURSOR curs_obj IS
SELECT decode( OBJECT_TYPE, 'PACKAGE BODY',
'ALTER PACKAGE ' || OWNER||'.'||OBJECT_NAME || ' COMPILE BODY',
'ALTER ' || OBJECT_TYPE || ' ' || OWNER||'.'||OBJECT_NAME || ' COMPILE' )
"COMP_OBJECT"
FROM dba_objects
WHERE STATUS = 'INVALID'
AND OBJECT_TYPE IN ( 'PACKAGE BODY', 'PACKAGE', 'FUNCTION', 'PROCEDURE',
'TRIGGER', 'VIEW' )
AND OWNER = USER
AND OBJECT_NAME NOT LIKE 'TOAD_PROFILER'
ORDER BY OWNER, OBJECT_TYPE, OBJECT_NAME;
BEGIN
-- Set Package/Procedure Name for email notification.
vFacility := cProcName || '.recompile_invalid_objects';
-- Select invalid object count
BEGIN
SELECT count(*)
INTO v_object_cnt
FROM dba_objects
WHERE STATUS = 'INVALID'
AND OBJECT_TYPE IN ( 'PACKAGE BODY', 'PACKAGE', 'FUNCTION', 'PROCEDURE',
'TRIGGER', 'VIEW' )
AND OWNER = USER
AND OBJECT_NAME NOT LIKE 'TOAD_PROFILER'
ORDER BY OWNER, OBJECT_TYPE, OBJECT_NAME;
-- Recompile invalid objects
IF v_object_cnt > 0 THEN
FOR i in curs_obj
LOOP
v_ins_str := i.COMP_OBJECT;
cursor_handle := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(cursor_handle,
v_ins_str,
DBMS_SQL.V7);
execute_feedback := DBMS_SQL.EXECUTE(cursor_handle);
DBMS_SQL.CLOSE_CURSOR(cursor_handle);
COMMIT;
END LOOP;
END IF;
END;
EXCEPTION
WHEN OTHERS THEN
-- Log error condition and generate email notification if needed.
toll_handle.error_condition(vFacility, toll_handle.get_ora_desc(sqlerrm),vErrorID);
END recompile_invalid_objects;
==== end of procedure ====
I got '0' count when I ran the invalid object count to see the invalid objects. I ran the following code ..and it gave me 0 value.
SELECT count(*)
FROM dba_objects
WHERE STATUS = 'INVALID'
AND OBJECT_TYPE IN ( 'PACKAGE BODY', 'PACKAGE', 'FUNCTION', 'PROCEDURE',
'TRIGGER', 'VIEW' )
AND OWNER = USER
AND OBJECT_NAME NOT LIKE 'TOAD_PROFILER'
ORDER BY OWNER, OBJECT_TYPE, OBJECT_NAME;
--- end of query ---
The count 0 means, there are no invalid objects. But it throws daily the same error notification mail at 1 AM[the time job runs]. I compiled the procedure and it reports no errors. I checked the status of the triggers and all are valid and enabled. Please suggest me. Any help in this regard will be of great help to me. Thanks in advance...