-1

I have Oracle Database 11.2.0.4. I want to import a dump file to it with impdp. The Dump file is for the Popualtion schema. The schema's name is case sensitive. How can I import this file to database?

impdp system/***** schemas="Popualtion" directory=test_dir dumfile=expdp.DMP

This command is wrong.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39165: Schema POPULATION was not found.
  • What was the schemas name in the source instance? POPULATION, Population or population? I'd also like to point out that your impdp... command has a wrong parameter: dumfile won't work; dumpfile would be better. – hot2use Apr 3 '18 at 9:25
0

you can remap schema while you import dump file.

impdp system/*****  directory=test_dir dumfile=expdp.DMP REMAP_SCHEMA=POPULATION :Popualtion

or you can use perl command to change word "POPULATION" to "Popualtion" in expdp.DMP file if you use linux ....

0

You can open dump file with any editor. and search for "schema=". You will find value ahead of equal to sign.

then replace this schema name in your command, and run again, it'll work.

Sample line:

CLIENT_COMMANDRSYSTEM/********@xyz **schemas=**ABC10 dumpfile=XYZ10.DMP logfile=test.log ˇÄ

  • The files from expdp are not readable by an editor. They are binary. – Marco Apr 3 '18 at 7:01
  • They are readable, it did open in editText on Mac Sierra. Above line block is copied from there itself. – abhijeet104 Apr 4 '18 at 3:05
0

Depending on what the original name of the schema was in the source instance, you might want to try running the following statement:

impdp system/******** schemas=Population directory=test_dir dumpfile=expdp.DMP

Important

  1. Ensure the name of the schema you are importing with the schemas parameter is indeed Population. If not insert the correct schema name.
  2. Please verify that the name used for the dumpfile parameter is expdp.DMP and not for example expdp.dmp (Relevant if you are on a Linux OS)
  3. Quotes are not usually required when adding parameters. In some cases you might have to escape the quotes as pointed out by other answers. Oracle recommends:

    Some operating systems treat quotation marks as special characters and will therefore not pass them to an application unless they are preceded by an escape character, such as the backslash (). This is true both on the command line and within parameter files. Some operating systems may require an additional set of single or double quotation marks on the command line around the entire parameter value containing the special characters.

    and

    To avoid having to supply additional quotation marks on the command line, Oracle recommends the use of parameter files.

    Reference: Use of Quotation Marks On the Data Pump Command Line (Oracle Docs 11.2)

Parameter File

You could put all your parameters in a impdp_mydump.par file like this:

schemas=Population 
directory=test_dir
....

and then run the import like this:

impdp system/******** parfile=impdp_mydump.par

Permissions / Privileges

In some cases if the user system doesn't have access to the directory you might have either grant access to the export directory via:

 GRANT READ,WRITE ON DIRECTORY test_dir TO system;

Reference: Oracle Data Pump Quick Start (Oracle.com / PDF)

...or run the impdp command with the sys account.

Side Note

In some rare cases where either sys or system have to many roles assigned to their accounts, you might have to run the impdp command with a dedicated import account that you would have to create from scratch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.