web analytics

Oracle: get the tablespace structure

The easiest method to get the tablespace structure is to use the dbms_metadata package:

SET linesize 200 LONG 50000 pagesize 5000 SELECT dbms_metadata.get_ddl(’TABLESPACE’,tablespace_name ) FROM dba_tablespaces WHERE tablespace_name IN ( ‘&your_tablespace’ );

Additionally, exp/imp (or expdp/impdp) utilities could be used. They could generate the DDL statements for all objects in the database, which could be […]