Search code examples
sqldatabaseoracleoracle-export-dump

Oracle SQL Dump file extracting parts to sql/another dump file


I have a Oracle DB dump file and now I only need parts of the tables that are included there. Does anyone know how I can extract this parts into a separate dump file (or SQL)?

I thought about using the import statement. Import from dump file (full export) to dumpfile (needed parts) something like this, but don't know if its possible this way

import user/pw directory=fullexport_dump dumpfile=part.dmp logfile=import.log status=30

Solution

  • No it's not possible. You can only limit rows while exporting using query parameter.

    exp .....  query="where id=10"
    

    You may search further in the Oracle Documentation.

    So, import the whole table, and create a new table with only required parts:

    create table NEEDEDPARTS as select * from FULLEXPORT where id=10
    

    Or, import the whole table and re-export with query parameter.