Skip to content

How Impdp REMAP_TABLE Multiple Tables

  • by

Remap Multiple Table

To prevent damaging the original tables, we usually import tables with different names for developers to verify. The parameter we should use in data pump (impdp) is REMAP_TABLE.

To remap a table, we used to use the format:

REMAP_TABLE=<SCHEMA_NAME>.<ORIIGNAL_TABLE_NAME>:<NEW_TABLE_NAME>

We know how to map a table, how about two or more tables?

Solutions

1. Delimited by Commas

Every mapping should be delimited by a comma like the following example:

[oracle@test ~]$ impdp system/password@orclpdb tables=hr.employees,hr.jobs remap_table=hr.employees:emp_bak,hr.jobs:job_bak dumpfile=full.dmp

We used one REMAP_TABLE and multiple table mappings.

2. Multiple REMAP_TABLE

Delimiting by commas may not feasible for hundreds of table remapping, so you may split them by the parameter REMAP_TABLE.

[oracle@test ~]$ impdp system/password@orclpdb tables=hr.employees,hr.jobs remap_table=hr.employees:emp_bak remap_table=hr.jobs:job_bak dumpfile=full.dmp

As you can see, there're two REMAP_TABLE in the command. The basic rule is that the source table can not be duplicated.

Leave a Reply

Your email address will not be published.