top of page
Search
Writer's picturemdvorkin

Get DDL for Oracle object

set feed off

set long 1000000

set longchunksize 1000000

set pages 0

set lines 32767

set trimspool on

set feed off

set wrap on

set serveroutput on format wrapped

set def off

set tab off


exec dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SQLTERMINATOR', TRUE);


select dbms_metadata.get_ddl('<TYPE>', '<NAME>', '<OWNER>') from dual;


-- Example:

select dbms_metadata.get_ddl('INDEX', 'XLA_AE_HEADERS_N1', 'XLA') from dual;

5 views0 comments

Recent Posts

See All

From Concurrent to Trace

-- Find running concurrent request's database session SELECT fcr.request_id, ftl.user_concurrent_program_name program_name, v.meaning...

Comments


bottom of page