Search code examples
oracleoracle12cdatapumpimpdpimp

Import Oracle Database 12c Enterprise Edition Release 12.1.0.1.0


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 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-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39145: directory object parameter must be specified and non-null

Do I have to first create the log file ?


Solution

  • You need to provide value for Directory parameter.

    impdp SOLVIA/SOLVIA900@IMMBO 
        DIRECTORY=TEST_Dir            <-- You need to provide value for this param
        DUMPFILE=week_exp_immbo.dmp 
        LOGFILE=week_exp_immbo.log 
        REUSE_DATAFILES=YES 
        exclude=tablespace:"IN ('IMMBO')"
    

    Where TEST_Dir is a Directory object in Oracle, that points to a location where the file is, from where the data is being imported.

    Example:

    CREATE DIRECTORY Test_Dir AS 'C:\TestFolder';
    

    Also make sure to give Read, Write permissions to user on that Directory.

    GRANT READ, WRITE ON DIRECTORY Test_Dir TO UserName;