How To Get the source for your package-oracle Apps

Leave a Comment

Oracle : How To Get the source for your package


Here are a couple of scripts that will let you get your hands on the source for your package as stored by the database.

1. Run following query to get specification of package:

        Select  TEXT 
        from SYS.ALL_SOURCE  
        where NAME='Package Name' 
        and TYPE='PACKAGE' 
        order by LINE;

2. Run following query to get body of package:

        Select  TEXT 
        from SYS.ALL_SOURCE 
        where NAME='Package Name'
        and TYPE='PACKAGE BODY'
        order by LINE;

From this queries we can see code is stored as a separate record for each line in the package.Also you can use following function to get package specification and package body in one line itself:


SELECT DBMS_METADATA.GET_DDL('PACKAGE_BODY','Package_NAME' ) FROM dual;
If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment