Query to get the package specification

In Oracle E-Business Suite R12.2.10, if you want to download (export) a package’s source code (specification and body), you can do it using a SQL query in TOAD, SQL Developer, or any other tool connected to the APPS schema.

 ## Query to get the package specification

sql > SELECT text

FROM all_source

WHERE name = UPPER('PACKAGE_NAME')

  AND type = 'PACKAGE'

ORDER BY line;


##Query to get the package body

sql > SELECT text

FROM all_source

WHERE name = UPPER('PACKAGE_NAME')

  AND type = 'PACKAGE BODY'

ORDER BY line;


In Oracle EBS R12.2.10, fetching a custom package (specification or body) is usually done directly from the APPS schema or from the Edition-Based Redefinition (EBR) filesystem if you want the file from the application tier.

# View Package Specification

SELECT text

FROM all_source

WHERE name = 'YOUR_PACKAGE_NAME'

  AND type = 'PACKAGE'

  AND owner = 'APPS'

ORDER BY line;


# View Package Body

SELECT text

FROM all_source

WHERE name = 'YOUR_PACKAGE_NAME'

  AND type = 'PACKAGE BODY'

  AND owner = 'APPS'

ORDER BY line;


No comments:

java.sql.SQLSyntaxErrorException: Access was denied to the user in MySQL 8.4.

 java.sql.SQLSyntaxErrorException: Access denied for user 'SIT'@'%' to database 'SIT' means the MySQL user SIT does ...