How to extract DDL for all tablespaces on Oracle Database

oracle-11g-logo

I was needing to extract  DDL for all tablespaces  on Oracle Database . Then, I took  the information about it using a DBMS_METADATA. Thus, follow  how to take this information:

SQL> set heading off;
SQL> set echo off;
SQL> set pages 2000
SQL> set lines 2000
SQL> set long 99999
SQL> spool ddl_tablespaces.sql
SQL> select dbms_metadata.get_ddl(‘TABLESPACE’, tablespace_name) from dba_tablespaces  ;
##HERE WILL BE SHOWN ALL  TABLESPACES DLL ABOUT YOUR DATABASE##
SQL> spool off

I hope this post can help you!

Related posts

15 Thoughts to “How to extract DDL for all tablespaces on Oracle Database”

  1. … [Trackback]

    […] Find More on to that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

  2. … [Trackback]

    […] Read More Info here to that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

  3. … [Trackback]

    […] Read More on that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

  4. … [Trackback]

    […] Info to that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

  5. … [Trackback]

    […] There you will find 45739 more Info to that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

  6. … [Trackback]

    […] Read More on to that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

  7. … [Trackback]

    […] Find More Info here on that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

  8. … [Trackback]

    […] Here you can find 92921 more Information to that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

  9. … [Trackback]

    […] Info on that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

  10. … [Trackback]

    […] Information to that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

  11. … [Trackback]

    […] Information on that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

  12. … [Trackback]

    […] Find More to that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

  13. … [Trackback]

    […] Information on that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

  14. … [Trackback]

    […] Read More on that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

  15. … [Trackback]

    […] Read More on on that Topic: techdatabasket.com/2015/01/07/how-to-extract-all-tablespaces-ddl-on-oracle-database/ […]

Leave a Comment