Oracle Export/Import issues with Tablespace

2019-09-07 02:21发布

I created a dump of a local oracle database like this:

expdp mydb/passwd -schemas=myschema -dumpfile=mydumpfile.dmp -logfile=oralog.log

I sent the dump to someone who is supposed to import the dump in his oracle server. Now, he tells me, the import fails due to some errors related to tablespaces (like tablespace XYZ is not available, - the database XYZ is in no relation to the respective database). Besides, he asks me to give some information about the dump concerning the tablespaces.

Since I am usually working with MySQL and have limited knowledge about these Oracle-Tablespace things: I would really appreciate to get some advise.

标签: oracle dump
1条回答
唯我独甜
2楼-- · 2019-09-07 02:51

Use REMAP_TABLESPACE parameter.

For example,

REMAP_TABLESPACE=(source1:destination1,source2:destination1,source3:destination1,source4:destination1)

Go through the documentation about Data Pump Import. A small quote -

Multiple REMAP_TABLESPACE parameters can be specified, but no two can have the same source tablespace. The target schema must have sufficient quota in the target tablespace.

Note that use of the REMAP_TABLESPACE parameter is the only way to remap a tablespace in Data Pump Import. This is a simpler and cleaner method than the one provided in the original Import utility. That method was subject to many restrictions (including the number of tablespace subclauses) which sometimes resulted in the failure of some DDL commands.

By contrast, the Data Pump Import method of using the REMAP_TABLESPACE parameter works for all objects, including the user, and it works regardless of how many tablespace subclauses are in the DDL statement.

查看更多
登录 后发表回答