1 Reply Latest reply on Dec 21, 2017 2:14 AM by Hemant K Chitale

    Remote directory path for export

    v.kk

      Hi ,

      I am creating the dbms job scheduler for export the dump file to remote machine,

      I used following command for creating the directory

       

      CREATE OR REPLACE DIRECTORY EXPDIR AS 'y:\dump';

       

      Note:I created mapping folder I given that path.

       

      If i give that Directory name is not doing the operation.I am getting the fallowing errors so kindly help me.

       

      ORA-39001: invalid argument value ORA-06512: at "SYS.DBMS_SYS_ERROR",

      line 79 ORA-06512: at "SYS.DBMS_DATAPUMP",

      line 3507 ORA-06512: at "SYS.DBMS_DATAPUMP",

      line 3756 ORA-06512: at "SYS.RUN_EXPORT",

      line 11 ORA-06512: at line 1

       

      Procedure

       

      create or replace procedure RUN_EXPORT

      as

      h1 NUMBER;

      v_time VARCHAR2(32);

      v_schema VARCHAR2(32);

      BEGIN

      SELECT to_char(SYSDATE, 'DD_MM_YYYY_hh24_mi_ss') INTO v_time FROM DUAL;

      v_schema:='PAGEOWNER';

      h1 := DBMS_DATAPUMP.OPEN(operation => 'EXPORT',job_mode => 'SCHEMA',job_name => 'MYJOBEXP_'||v_time,version => 'COMPATIBLE');

      dbms_output.put_line('h1='||h1);

      DBMS_DATAPUMP.add_file (h1, v_schema||'_'||v_time||'.DMP','EXP_DIR');

      DBMS_DATAPUMP.metadata_filter (handle => h1,name => 'SCHEMA_EXPR',VALUE => 'IN('''||v_schema||''')');

      DBMS_DATAPUMP.start_job (handle => h1, skip_current => 0, abort_step => 0);

      DBMS_DATAPUMP.detach (handle => h1);

      END;

       

      version : Oracle 11g R2

      kindly help me.