3 Replies Latest reply on Dec 5, 2019 1:56 AM by Gaz in Oz

    EXPDP Tables only for a schema

    3222365

      WOW, so many parameters.....

       

      I need to expdp "only the tables" from a specific schema.  No other objects, just the tables and their data.

        • 1. Re: EXPDP Tables only for a schema
          Gaz in Oz

          For just tables and data "INCLUDE=TABLE_DATA"

          For example:

          expdp system@your_db directory=your_dir dumpfile=your_tables.dmp logfile=your_tables.log schemas=your_schema include=table_data

          To get tables, data and  related DDL like grants, indexes, constraints etc, you would use "INCLUDE=TABLE" instead.

          • 2. Re: EXPDP Tables only for a schema
            Dean Gagne-Oracle

            Gaz,

             

            Not quite right.

             

            1. If you say include=table_data then you just get the data, you will need the tables already existing for the import to work.

             

            2.   If you say include=table, then anything with 'TABLE' in the description will be exported/imported.   This includes TABLE/INDEX TABLE/GRANT etc.

             

            Use Gaz's export command or one like this:

             

            expdp schema_you_want/password directory=your_dir dumpfile=yourdump ...    <then see below for options>

             

            If you want just the table metadata, then say:     include=table/table  This does not give you the data

             

            If you want the table metadata and the data then say:    include=table/table table/table_data

             

            Hope this helps.

             

            Dean

            • 3. Re: EXPDP Tables only for a schema
              Gaz in Oz

              With respect to point 1:

              1. If you say include=table_data then you just get the data, you will need the tables already existing for the import to work.

              ... thanks for pointing that out. "include=table_data" means exactly that, just the table/s data.