Friday, January 24, 2014

Get DDL from objects in PL-SQL

First you should find some information before try to get a DDL, this is related to the object type(Package, table, etc.) you want to find.

Use this query:

select * from all_objects where upper(object_name) = upper('swc_file_ctl_utl');


Now from the query above use the following fields "owner" and "object_type" you will need these values when you try to get its DDL.

Execute this query for obtaining the DDL:

select dbms_metadata.get_ddl(object_type => 'PACKAGE',name =>'SWC_FILE_CTL_UTL',schema => 'APPS')
 ddl from dual;

No comments:

Post a Comment