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.
- Open your application
- In the Task sidebar click on View Application Reports
- Update for 3.x: Click Shared Components and then in the Application section on Database Object Dependencies
- For pre-3.0 installations: Click Application and then on Database Object Dependencies
- Press the Compute Dependencies button
- This will take some time…
- 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.