I'm trying to export the full database using the datapump API, I tried to use this following code:

handle NUMBER;

nom_job varchar(25) := to_char(SYSDATE,'YYYYMMDD_HH24MISS');
nom_dump varchar(25) := nom_job || '.dmp';
nom_log varchar(25) := nom_job || '.log';


    operation => 'EXPORT',
    job_mode  => 'FULL',
    job_name  => nom_job



    handle    => handle,
    filename  => nom_dump,
    directory => 'C:\Backup_folder',
    filetype  => 1



    handle    => handle,
    filename  => nom_log,
    directory => 'C:\Backup_folder',
    filetype  => 3



    handle => handle,
    skip_current => 0,
    abort_step => 0



    handle=> handle



But it gives me this next error:

ORA-39001: valeur d'argument non valide
ORA-06512: à "SYS.DBMS_SYS_ERROR", ligne 79
ORA-06512: à "SYS.DBMS_DATAPUMP", ligne 2926
ORA-06512: à "SYS.DBMS_DATAPUMP", ligne 3162
ORA-06512: à ligne 21
39001. 00000 -  "invalid argument value"
*Cause:    The user specified API parameters were of the wrong type or
           value range.  Subsequent messages supplied by
           DBMS_DATAPUMP.GET_STATUS will further describe the error.
*Action:   Correct the bad argument and retry the API.

the line 21 is :


Where is the problem exactly in that function?


In the Argument 'Directory' of the ADD_FILE procedure, i should specify the name of the directory created by the next command instead of the actual path:

create directory backup_folder as 'C:\backup_folder'

PS: the name of the directory specified in ADD_FILE should be in upper case (CAPITAL LETTERS).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.