Site icon IT Tutorial

ORA-24344: success with compilation error

I got ” ORA-24344: success with compilation error ” error in Oracle database.

 

ORA-24344: success with compilation error

 

Details of error are as follows.

ORA-24344: success with compilation error

Cause: A sql/plsql compilation error occurred.

Action: Return OCI_SUCCESS_WITH_INFO along with the error code





 

 

success with compilation error

This ORA-24344 errors are related with the sql/plsql compilation error occurred.

To solve this error, Return OCI_SUCCESS_WITH_INFO along with the error code.

 

A typical example of the sort of errors you may get are:

ALTER PACKAGE "<schema1>"."<obj1>" COMPILE BODY
ERROR executing steps
ORA-24344: success with compilation error
errorExitOraError!

When you investigate the issue and try the failing statement manually:

SQL> ALTER PACKAGE "<SCHEMA1>"."<obj1>" COMPILE BODY;

Warning: Package Body altered with compilation errors.

SQL> show err
Errors for PACKAGE BODY "<SCHEMA1>"."<obj1>":

LINE/COL ERROR
-------- -----------------------------------------------------------------
15/4 PL/SQL: Statement ignored
15/13 PLS-00905: object <schema2>.<obj2> is invalid

In the reported case the second package <schema2>.<obj2> depended on a view that was also invalid because the owner of the view had no privileges on the base tables (with grant option).

 

 

The solution is to temporarily use system privileges instead of object privileges to be able to resolve cross-schema dependencies while the data masking script is running. Please note when the masking script aborts, the object privileges are not yet restored, however if you manage to successfully complete the masking script the object privileges should also be restored, it is not that they are missing but they are executed too late / in the wrong order. Typically grant the SELECT ANY TABLE and EXECUTE ANY PROCEDURE privileges to any schema referenced by the Data Masking script. When it has successfully completed, you can revoke them again.

In the reported case (but note this is only an example):

grant select any table to username;

grant EXECUTE ANY PROCEDURE to username;

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

Exit mobile version