How to see source code of a oracle object (get meta data of oracle object)





How to see source code



DBMS_METADATA.GET_DDL (
object_type     IN VARCHAR2,
name            IN VARCHAR2,
schema          IN VARCHAR2 DEFAULT NULL,
version         IN VARCHAR2 DEFAULT 'COMPATIBLE',
model           IN VARCHAR2 DEFAULT 'ORACLE',
transform       IN VARCHAR2 DEFAULT 'DDL')
RETURN CLOB;


set trimspool off
set linesize 32000
set long 20000000
set pagesize 0
column ddl format a50000
SET echo off;
set pagesize 0;
SET long 500000;


select
dbms_metadata.get_ddl('VIEW', 'VIEW_NAME', 'OWNER') as SOURCE
from
dual;

No comments:

Post a Comment