Oracle Error PLS-00900: can’t find body of unit ‘string’

Oracle Error Message

PLS-00900: can’t find body of unit ‘string’

Reason for the Error

At run time, the body of a program unit could not be found. This can happen for one of two reasons. — First, there may be a unit ‘a’ which calls a module ‘b’, where the spec for ‘b’ exists but not the body. In this case, since the spec is present, there will be no compile-time errors. — Secondly, this can occur if there is a reference to a sequence outside of the proper context such as a SQL statement. In this case, the “spec” of the sequence reference can be found, but it is invalid to actually run code which references the sequence outside a SQL statement, as in: i := seq.nextval;

Solution

If caused by the first reason, create a body for the object that is being referenced. If caused by the second reason, move the sequence into a SQL statement. For example, i := seq.nextval; can be replaced by: select seq.nextval into temp from dual; i := temp;

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Oracle Error Message CLSGN-32767: Internal error. Reason for the Error An unexpected error occurred. Solution Examine the message(s) that accompany...
Oracle Error Message CLSGN-00211: OCR batch operation failed. string Reason for the Error Setting a set of Oracle Cluster Registry...
Oracle Error Message CLSGN-00210: failed to get value for OCR key “string”. string Reason for the Error It was not...