Displaying user packages in Oracle 11g

sysadminIf you need to know how to view packages that are stored in Oracle 11g, here are the steps.

First, you’ll need to be logged in as the user that owns the packages, then run this query.

SELECT object_name, object_type FROM user_objects WHERE object_type='PACKAGE';

With the package name, you’ll then run this query to get the body of the package.

SELECT DBMS_METADATA.GET_DDL('PACKAGE','<object name>') FROM dual;

The results will be in a CLOB, and you may need to replace occurrences of “/n” with proper line feeds.

Leave a Reply

Your email address will not be published. Required fields are marked *