简体   繁体   中英

Import with condition clause (query) in parfile - Oracle12c

I'm trying to import specific rows from a full '.dmp' file using the parfile parameter.

Import command:

IMP userid=user/password@db parfile=parfile.dat

parfile.dat file:

PARFILE

But I'm receiving the error below when executing the IMP command: 收到错误

What can be the problem?

Is it possible to use a condition using the old IMP command? If yes, why it is not working?

Thank you for your help,

As long as PARFILE is a valid parameter for the original IMP utility, QUERY is not - which answers your question:

is it possible to use a condition using the old IMP command?

No, it is not.

If yes, why is it not working?

Because it is not supported.

As you're on 12c, here's the Original Import documentation. Have a look at its Parameters section - you won't find QUERY in there (to see the list of all parameters, expand the tree node on the left hand side of the screen).

So, what to do?

  • Use Data Pump instead, if possible
  • If all you have is the DMP file created with the original EXP (and you can't obtain a new, data pump one), import the whole table and write a query which will select data from it, using WHERE clause you meant to use in the PARFILE .
    • Alternatively, delete all rows that don't satisfy that condition.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM