mercredi 4 février 2015

How to generate an SQL file with DBMS_DATAPUMP


I am trying to generate an SQL file with the DBMS_DATAPUMP api. This tasks is specifically adressed in Oracle support Node 1519981.1 (How To Generate A SQL File Using The DBMS_DATAPUMP API).


When I copy/paste the code found in the mentioned document, it fails on line 5 with a rather obscure



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 3444
ORA-06512: at "SYS.DBMS_DATAPUMP", line 3693
ORA-06512: at line 5


The line in question, that is line 5, is DBMS_DATAPUMP.add_file(...) with the parameter filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_SQL_FILE.


I have run the script with a user that has DBA privileges.


I have also created an Oracle directory named MYDIR. The OS directory it points to exists and is writeable.





Aucun commentaire:

Enregistrer un commentaire