表空間指令碼:
SELECT TS.TABLESPACE_NAME,
TO_CHAR(DBMS_METADATA.get_ddl(`TABLESPACE`,TS.TABLESPACE_NAME))
FROM DBA_TABLESPACES TS;
INDEX索引指令碼:SELECT DBMS_METADATA.get_ddl(`INDEX`,U.index_name) FROM USER_INDEXES U
表空間指令碼:
SELECT TS.TABLESPACE_NAME,
TO_CHAR(DBMS_METADATA.get_ddl(`TABLESPACE`,TS.TABLESPACE_NAME))
FROM DBA_TABLESPACES TS;
INDEX索引指令碼:SELECT DBMS_METADATA.get_ddl(`INDEX`,U.index_name) FROM USER_INDEXES U