Who is diana, and why won't she let my database objects compile?

oracle, stored-procedures, view

Solution

Relevant here: PL/SQL, Package Size, Parse Tree Nodes, Lines of Code.

Diana is Oracle’s interface definition language to represent the structure of database tables and the logic of PL/SQL program units as attributed trees.

There are internal limits on the number of parse tree nodes. Compiler version sets the maximum lines of code.

So check the size of PL/SQL logic and the lines of code. It may not be possible, or even necessary to know the actual limits that your version can handle.

Once you know where to right size your package, half the problem is solved.

Let us know when you have solved the other half, too, thanks.

Problem

OK, so the question title is a little tongue-in-cheek, but the question is serious enough. Occasionally, when compiling the objects in a schema or importing a dump file, I see the following error message: ``` ORA-04028: cannot generate diana for object SCOTT.VW_EMP ``` what does this actually mean, and how can I avoid it?

Original source