1

I want to import a Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production

using the command :

impdp SOLVIA/SOLVIA900@IMMBO DIRECTORY=DB_EXP DUMPFILE=week_exp_immbo.dmp LOGFILE=week_exp_immbo.log REUSE_DATAFILES=YES exclude=tablespace:"IN ('IMMBO')"

But I got this error:

Connected to: Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
ORA-39001: invalid argument value
ORA-39071: Value for EXCLUDE is badly formed.
ORA-00936: missing expression
en Lopes
  • 1,863
  • 11
  • 48
  • 90

1 Answers1

4

Exclude Arguments with Data Pump in Command Mode Require Quotations to be Escaped

The invocation you are using looks reasonable.

Here it is:

impdp SOLVIA/SOLVIA900@IMMBO DIRECTORY=DB_EXP DUMPFILE=week_exp_immbo.dmp LOGFILE=week_exp_immbo.log REUSE_DATAFILES=YES exclude=tablespace:"IN ('IMMBO')"

Per My Oracle Support document, How To Resolve The Error ORA-39071 Value For EXCLUDE Is Badly Formed (Doc ID 734324.1), you need to *escape the quotations like this:

impdp SOLVIA/SOLVIA900@IMMBO DIRECTORY=DB_EXP DUMPFILE=week_exp_immbo.dmp LOGFILE=week_exp_immbo.log REUSE_DATAFILES=YES exclude=tablespace:\"IN (\'IMMBO\')\"

*: Escaping quotation marks is required with a Linux operating system. This does not apply to Windows operating systems.

Patrick Bacon
  • 4,490
  • 1
  • 26
  • 33