Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dbms_datapump - ORA-39001 - Invalid argument value when change directory

user5716448Sep 20 2012 — edited Sep 20 2012
Hi,

Can run code fine when have directory as DATA_PUMP_DIR but get message

ORA-39001 when change directory from DATA_PUMP_DIR to DATA_EXPORTS_DIR

DATA_EXPORTS_DIR defintely exists and user running under has read,write permission on the directory.


using Oracle 11.2.0.3 on AIX Power Series 7 IBM
Any ideas?
declare 
  h1 number; -- Datapump handle 
  dir_name varchar2(30); -- Directory Name 
  
begin 
  dir_name := 'DATA_EXPORTS_DIR'; 
  h1 := dbms_datapump.open(operation =>'EXPORT', 
  job_mode =>'TABLE', 
  remote_link => NULL, 
  job_name =>'POR_TABLE2'); 

  dbms_datapump.add_file(handle =>h1, 
                         filename => 'POR.DMP', 
                         directory => dir_name, 
                         filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE, 
                         reusefile => 1); -- value of 1 instructs to overwrite existing file 

  dbms_datapump.add_file(handle =>h1, 
                         filename => 'por-EXPDAT.LOG', 
                         directory => dir_name, 
                         filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE, 
                         reusefile => 1); -- value of 1 instructs to overwrite existing file 

  dbms_datapump.metadata_filter(handle =>h1, 
                         name => 'TABLE_FILTER', 
                         value => 'BATCH_AUDIT'); 
-- 
-- Start the job. 
-- 
  dbms_datapump.set_parameter(h1, 'TRANSPORTABLE', 'ALWAYS'); 
  dbms_datapump.start_job(h1); 
  begin 
     dbms_datapump.detach(handle => h1); 
  end; 
end;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 18 2012
Added on Sep 20 2012
4 comments
4,518 views