set heading off;
set echo off;
Set pages 1000;
set long 70000;
spool ddl_tablespace.sql
select dbms_metadata.get_ddl(‘TABLESPACE’,tb.tablespace_name) from dba_tablespaces tb;
spool off
Get DDL of all tablespaces
set heading off;
set echo off;
Set pages 1000;
set long 70000;
spool ddl_tablespace.sql
select dbms_metadata.get_ddl(‘TABLESPACE’,tb.tablespace_name) from dba_tablespaces tb;
spool off