Oracle IMPDP remap_schema
Hello Experts,
May I know How to import multiple schemas to another user using the impdp?
I have tried the following:
impdp directory = dtpdir dumpfile=schema.dmp logfile=schema.log remap_schema = 'schema1:user1,schema2:user1
It is working but only the latest schema(schema2) is copied to user1 but not schema1.
So Please give me the solution, thanks in advance.
Solution
The error you mentioned is due to incorrect syntax for the remap_schema parameter. The remap_schema parameter in Oracle’s Data Pump utility (impdp) allows you to map multiple schemas during the import, but the correct format requires each schema pair to be mapped individually.
The correct syntax for importing multiple schemas to a single user using impdp
is the following
impdp directory=dtpdir dumpfile=schema.dmp logfile=schema.log remap_schema=schema1:user1 remap_schema=schema2:user1;
Key Points:
- Each schema-to-user mapping should have its own remap_schema parameter.
- The correct format is remap_schema=schema1:user1, and it should be repeated for each schema that you want to remap.
Using this approach, both schema1
and schema2 will be imported user1 without any error.
Please use sql query given below in order to import and export multiple schema using impdp:
impdp schemas=schema1,schema2,schema3 directory=DATA_PUMP_DIR dumpfile=schemas120514bkp.dmp logfile=impdpschemas120514.log