Latest Updates

Post Top Ad

03 January, 2013

ORA-24344: Success with Compilation Error

Question:  I am running a PL/SQL procedure on my system.  I am getting the following error:
ORA-24344: success with compilation error
but it is not showing details about the ORA-24344 error.   Can you help me out?

Answer:  To diagnose any error, you start by using the
oerr utility to display the ORA-24344 error:
ORA-24344: success with compilation error
Cause: A sql/plsql compilation error occurred.

Action: Return OCI_SUCCESS_WITH_INFO along with the error code
Simply put, ORA-24344 tells you there is a problem somewhere in your code.
PL/SQL does not always tell you about compilation errors. Instead, it gives you a cryptic message such as "success with compilation error " or "procedure created with compilation errors".
Depending on the complexity of your code, you can skim it for obvious syntax errors.  If it's not immediately obvious what is wrong or missing, issue the following command:
 show errors procedure <procedure_name> ;
Alternatively, to see the most recent errors, type the following:
 SHOW ERRORS
or the abbreviated version works just as well:
SHO ERR
The location of the error given as part of the error message is not always accurate, but it is generally the best place to start your investigation.
The following example is an excerpt from  the Easy Oracle PL/SQL Programming book by John Garmany.
SQL> create or replace function broken  
2    (n_faren IN number)  
3  as  
4    n_cel number := 0;  
5  begin  
6    n_cel := (5/9)*(n_faren -32);  
7    return n_cel;  
8  end;  
9  / 

Warning: Function created with compilation errors.
SQL> show errors
 
Errors for FUNCTION BROKEN:
 

LINE/COL ERROR
-------- ------------------------------------------------
3/1      PLS-00103: Encountered the symbol "AS" when expecting one of the following: return

5/1      PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following:  end function package

No comments:

Post Top Ad

Your Ad Spot