Вопрос

I'm using Oracle 11 and I'm having trouble moving tables between two databases. I've successfully exported a datadumb as follows:

expdp.exe www/www@xe tables=TABLE1,TABLE2,TABLE3 directory=dmpdir dumpfile=tables.dmp

When I try to:

impdp.exe www2/www2@xe tables=TABLE1,TABLE2,TABLE3 directory=dmpdir dumpfile=tables.dmp

As a result I got the following exception:

ORA-39002: invalid operation
ORA-39166: Object WWW2.TABLE1 was not found.
ORA-39166: Object WWW2.TABLE2 was not found.
ORA-39166: Object WWW2.TABLE3 was not found.

If I try to:

impdp.exe www2/www2@xe remap_tables=WWW2:TABLE1,TABLE2,TABLE3 directory=dmpdir dumpfile=tables.dmp

I get:

LRM-00101: unknown parameter name 'remap_tables'

In my situation I can't use a database link. How can I change the schema when importing and exporting my tables? Have I somehow misunderstood Oracle?

Это было полезно?

Решение

Use REMAP_SCHEMA=WWW:WWW2 and drop the tables= clause.

impdp.exe www2/www2@xe REMAP_SCHEMA=WWW:WWW2 directory=dmpdir dumpfile=tables.dmp

Другие советы

I think you want the REMAP_SCHEMA parameter. The REMAP_TABLE (note the spelling) parameter is for changing the name of a table, not the schema it belongs to.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top