Find invalid PL/SQL code in your Oracle APEX application

Did you know that you can use the Database Object Dependencies report of Oracle Application Express (APEX) to find PL/SQL code in your application which doesn’t compile? So that your users don’t get a runtime error.

  1. Open your application
  2. In the Task sidebar click on View Application Reports
  3. Update for 3.x: Click Shared Components and then in the Application section on Database Object Dependencies
  4. For pre-3.0 installations: Click Application and then on Database Object Dependencies
  5. Press the Compute Dependencies button
  6. This will take some time…
  7. Click onto the Parsing Errors link and you have all your invalid PL/SQL code snippets!

What does APEX/Oracle do in the background when you press the Compute Dependencies button?

It creates for each PL/SQL code a procedure, so that it can read the Oracle Dependency dictionary views to find references to other packages, tables, views, …

Very clever! So they didn’t have to write there own parser. And we can use the outcome to see which of the procedures didn’t compile.