Debugging Procedures and Unit Testing

Procedures are made up of the functions, transactions, and cursors we have been discussing in this chapter. They are also part of the packages. Understanding how to write stored procedures is important for a DBA. Understanding how to review procedures and find the good and the bad in them may be even more important.

When you’re experiencing problems with procedures, check their permissions on objects. Also check for the dreaded missing semicolon somewhere. These are quick areas to check, and in a small stored procedure, they might be easy to spot.

Privileges needed for running in debug mode for PL/SQL are “Debug any procedure” and “Debug connect session.” Figure 9-2 shows an example of compiling a procedure ...

Get Oracle Database Administration for Microsoft SQL Server DBAs now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.