0

I am trying to import a datapump dump file into a remote server via SQLPlus.

So, local machine -> remote oracle Server Dump file is on local machine on a SMB share.

I have written a little script for that operation, however it fails with errors. The Datapump Directory exists (SMB share on local machine, DIRECTORY is pointing to said share) My script:

DECLARE
      ind NUMBER;              -- Loop index
      h1 NUMBER;               -- Data Pump job handle
      percent_done NUMBER;     -- Percentage of job complete
      logfileName VARCHAR2(30);-- Name of the Logfile
      job_state VARCHAR2(30);  -- To keep track of job state
      le ku$_LogEntry;         -- For WIP and error messages
      js ku$_JobStatus;        -- The job status from get_status
      jd ku$_JobDesc;          -- The job description from get_status
      sts ku$_Status;          -- The status object returned by get_status
    BEGIN

      h1 := DBMS_DATAPUMP.OPEN('IMPORT','FULL',NULL,'IMPORT_XYDESCRIPTOR');

      DBMS_DATAPUMP.ADD_FILE(h1,'dump.dmp','DPIMP_REMOTE',NULL,DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE,1);

      DBMS_DATAPUMP.SET_PARAMETER(h1,'TABLE_EXISTS_ACTION','APPEND');

      DBMS_DATAPUMP.START_JOB(h1);
    [... more stuff...]

However I get the following error, when I execute that script as SYSDBA:

DECLARE
*
ERROR at line 1:
ORA-39001: invalid argument value
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4056
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4307
ORA-06512: at line 15

line 15 is this line:

DBMS_DATAPUMP.ADD_FILE(h1,'dump.dmp','DPIMP_REMOTE',NULL,DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE,1);

I don't really get why I get an invalid argument value error, the command is exactly as the Oracle wiki dictates.

Can someone help me on what I am doing wrong? Maybe the thing I try isn't even possible?

  • The problem might be the `1` parameter at the end of that line. The docs say "The reusefile parameter is restricted to export jobs", and you're doing an import job. I'd just leave off the last 3 arguments since you just want the defaults. – kfinity Jul 23 '19 at 12:36
  • @kfinity when I change the line to just the first three arguments, I get the same error – user3829915 Jul 23 '19 at 13:41
  • Oh, I missed that the directory was a mapped SMB folder. Try this similar question: https://stackoverflow.com/questions/34384553/cant-import-dump-from-mapped-net-drive-using-data-pump – kfinity Jul 23 '19 at 14:27

0 Answers0