My Oracle Support Banner

DBMS_DATAPUMP fails with ora-39001 when file exist. (Doc ID 307634.1)

Last updated on AUGUST 04, 2018

Applies to:

PL/SQL - Version and later
Oracle Database - Enterprise Edition - Version and later
Information in this document applies to any platform.
***Checked for relevance on 10-Apr-2013***


You started a DataPump export using the API as in example below:

create or replace procedure schema_exp_imp (prun_id in number, pdo_type in varchar2) is
  not_valid_schema_dp_type exception;
  ndp_handle number;
  ndeg_para number default 2;

  if (upper (pdo_type) not in ('IMPORT', 'EXPORT')) then
    raise not_valid_schema_dp_type;
  end if;

  ndp_handle := (pdo_type, 'SCHEMA');
  dbms_datapump.set_parallel (ndp_handle, ndeg_para);
  dbms_datapump.add_file (ndp_handle, user||'.dmp' , 'ORADUMP');
  dbms_datapump.start_job (ndp_handle);

  when others then
    insert_log (prun_id, 'Error', substr((sqlcode||' - '||sqlerrm), 1, 255));
end schema_exp_imp;

You started this procedure with:

SQL> exec schema_exp_imp (4272005, 'EXPORT');

and this ended with errors:

ORA-39001: invalid argument value
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 2486
ORA-06512: at "SYS.DBMS_DATAPUMP", line 2718
ORA-06512: at "COMMON.SCHEMA_EXP_IMP", line 28
ORA-06512: at line 1


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.