0

I have created a new oracle DB 18xe on a docker.

I am trying to import a dump file using the following command

impdp **/**@xepdb1 directory=DATA_PUMP_DIR dumpfile=file.dmp 
remap_schema='source:dest' logfile=imp.log  CONTENT=DATA_ONLY 

I am getting the following error

Import: Release 18.0.0.0.0 - Production on Thu Dec 9 05:39:42 2021
Version 18.4.0.0.0

Copyright (c) 1982, 2018, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production

ORA-39002: invalid operation

I could not figure out why I am getting this error, I tried to import one table only, used the following command

impdp **/**@xepdb1 directory=DATA_PUMP_DIR dumpfile=file.dmp 
remap_schema='source:dest' logfile=imp.log  CONTENT=DATA_ONLY  tables=table1

I got the following error

Import: Release 18.0.0.0.0 - Production on Thu Dec 9 05:39:42 2021
Version 18.4.0.0.0

Copyright (c) 1982, 2018, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production

ORA-39002: invalid operation
ORA-39166: Object dest.table1 was not found or could not be exported or imported.

Appreciate your assistance people.

OceanWavez
  • 291
  • 1
  • 2
  • 10
  • Have you considered that the destination table might not be identical in structure to the source table? – EdStevens Dec 09 '21 at 14:21

1 Answers1

0

As far as I can tell, remap_schema doesn't / shouldn't have single quotes.

No : remap_schema='source:dest'

Yes: remap_schema=source:dest

See REMAP_SCHEMA in documentation.

Littlefoot
  • 131,892
  • 15
  • 35
  • 57
  • I removed the single quote, same behavior – OceanWavez Dec 09 '21 at 08:30
  • The 2nd import's error says that "object dest.table1 was not found". You were importing DATA_ONLY. Try to first create the table, and then import DATA_ONLY (or - obviously - remove that parameter altogether). – Littlefoot Dec 09 '21 at 08:32
  • The table is already created, and without the table clause I get this invalid operation – OceanWavez Dec 09 '21 at 08:49
  • Is that the whole error stack? Or are there any other messages? If so, could you post *everything* Oracle says. Not as a comment - edit the original question you posted. – Littlefoot Dec 09 '21 at 08:58
  • this is the error I am getting, I am not able to make show more errors, do you know other ways? – OceanWavez Dec 09 '21 at 12:36
  • If there's nothing on the screen, does log file contain any additional info? – Littlefoot Dec 09 '21 at 12:39