oracle-databaseoracle19coracle-dump

Import Oracle DUMP file in oracle instance 19c


I have an oracle .dmp file and I do not know any other information about that, I want to import this dump file to my oracle 19c database.

When I use the imdb command like this:

impdp DIRECTORY=E:\Oracle19c\db_home\admin\sample\bdump DUMPFILE=tf20200325.dmp

I get these errors:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39087: directory name E:\ORACLE19C\DB_HOME\ADMIN\SAMPLE\BDUMP is invalid

When I use the imp command like this:

imp file=E:\Oracle19c\db_home\admin\sample\bdump\tf20200325.dmp full=y;

I get these errors:

IMP-00038: Could not convert to environment character set's handle
IMP-00000: Import terminated unsuccessfully

I tried after searching on the web, but not found any solution to help me.

notable: I am not creating any databases, I only create a user with all privileges.


Solution

  • The directory you specify is the name of a database directory object, not the actual directory. So, connect to your db as SYS, and do

    create directory xyz as 'E:\Oracle19c\db_home\admin\sample\bdump\';
    grant all on directory xyz to (put your user name);
    

    and then you can use it like this:

    impdp directory=xyz .....