Query per estrarre la DDL degli oggetti ORACLE

Query per estrarre la DDL degli oggetti ORACLE

.

Estrazione DDL TABLE:

set heading off;
set echo off;
Set pages 999;
set long 90000;
select dbms_metadata.get_ddl('TABLE','&TABLE_NAME','&user') from dual;

Estrazione DDL INDEX:

set heading off;
set echo off;
Set pages 999;
set long 90000;
select dbms_metadata.get_ddl('INDEX','&INDEX_NAME','&OWNER') from dual;

Estrazione DDL VIEW:

set heading off;
set echo off;
Set pages 999;
set long 90000;
select dbms_metadata.get_ddl('VIEW','&VIEW_NAME','&OWNER') from dual;

Estrazione DDL PACKAGE:

set heading off;
set echo off;
Set pages 999;
set long 90000;
select dbms_metadata.get_ddl('PACKAGE','&PACKAGE_NAME','&OWNER') from dual;

Estrazione DDL PROCEDURE:

set heading off;
set echo off;
Set pages 999;
set long 90000;
select dbms_metadata.get_ddl('PROCEDURE','&PROCEDURE_NAME','&OWNER') from dual;

Estrazione DDL TRIGGER:

set heading off;
set echo off;
Set pages 999;
set long 90000;
select dbms_metadata.get_ddl('TRIGGER','&TRIGGER_NAME','&OWNER') from dual;

Estrazione DDL FUNCTION:

set heading off;
set echo off;
set lines 210
Set pages 999;
set long 90000;
select dbms_metadata.get_ddl('FUNCTION','&FUNCTION_NAME','&OWNER') from dual;

Lascia un commento

Wordpress Social Share Plugin powered by Ultimatelysocial
Facebook
Facebook
Twitter
YouTube
LinkedIn