9.6. USER_SOURCE

The source code for compiled procedures, functions, packages, or package bodies is accessible from the USER_SOURCE view.

Refer to Chapter 5 for a detailed explaination on the differences among data dictionary views that have prefixes: USER, ALL, and DBA. The PL/SQL code you compile in your schema can be selected at any time from USER_SOURCE.

  • Query USER_SOURCE for the PL/SQL code you have compiled in you account.

  • Query ALL_SOURCE for everything in USER_SOURCE plus all other PL/SQL to which you have been given the EXECUTE privilege.

  • Query DBA_SOURCE is all the PL/SQL code in the database.

Because the scope of DBA views is everything in the database, you must have either the Oracle DBA role or the Oracle SELECT_CATALOG_ROLE role. ...

Get Programming Oracle® Triggers and Stored Procedures, Third Edition 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.