Friday, May 15, 2009

Duplicate/Move/Import/Rename Schema

I was asked to copy two schemas from two databases into another.

Problem: The copies would have different names and use other Tablespaces

Solution: Export via Datapump (expdp schema=schema_name [...]) and import with remap_schema and remap_tablespace parameter:

impdp schemas=schema_name remap_schema=schema_name:new_schema_name remap_tablespace=tablespace_name:new_tablespace_name [...]

Labels: , , , ,