分类: Oracle
2008-08-28 14:57:27
set pagesize 0 set long 90000 set feedback off set echo off spool get_allddl.sql connect USERNAME/PASSWORD@SID; SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name) FROM USER_TABLES u; SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name) FROM USER_INDEXES u; spool off; |