-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -- Author : Sameer S Choudhari -- Description : Get the DDLs for tablespace -- Call Syntax : @tablespace_DDLs.sql -- Last Modified: 17/03/2015 -- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ SET LONG 9999999 longchunksize 9999999 pagesize 0 linesize 300 feedback OFF verify OFF trimspool ON head OFF echo OFF SET head OFF echo OFF SELECT dbms_metadata.get_ddl('TABLESPACE',tablespace_name) FROM dba_tablespaces WHERE tablespace_name NOT IN ('RBS','SYSAUX','SYSTEM','TSMTOOLS','TSMUSERS','TEMP') ORDER BY tablespace_name; /*select 'select dbms_metadata.get_ddl(''TABLESPACE'',''' || tablespace_name || ''') from dual;' from dba_tablespaces where tablespace_name not in ('RBS','SYSAUX','SYSTEM','TSMTOOLS','TSMUSERS','TEMP') order by tablespace_name; */ spool tablespace_creation_ddls.SQL / spool OFF; SET linesize 80 pagesize 14 feedback ON trimspool ON verify ON