Skip to Main Content

Oracle Database Discussions

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!

ERROR: ora_sqlerrm: ORA-39001: invalid argument value

Er.RJJan 13 2018 — edited Jan 16 2018

Hello All,

Am trying to export the database using datapump but am getting following error:

......ora_sqlerrm: ORA-39001: invalid argument value

......error_backtrace: 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 line 33

ORA-06512: at "SYS.DBMS_SYS_SQL", line 1926

ORA-06512: at "SYS.WWV_DBMS_SQL", line 1033

ORA-06512: at "SYS.WWV_DBMS_SQL", line 1047

ORA-06512: at "APEX_050000.WWV_FLOW_DYNAMIC_EXEC", line 895

ORA-06512: at "APEX_050000.WWV_FLOW_PROCESS_NATIVE", line 67

ORA-06512: at "APEX_050000.WWV_FLOW_PROCESS_NATIVE", line 1101

ORA-06512: at "APEX_050000.WWV_FLOW_PLUGIN", line 2014

ORA-06512: at "APEX_050000.WWV_FLOW_PROCESS", line 188

It was working fine for 1 year but suddenly today i got the error.

To do export database i create folder & directory as shown below:

----to export file----

srl@srl-dell:~$ mkdir export_db

srl@srl-dell:~$ cd export_db

srl@srl-dell:~/export_db$ mkdir dump

srl@srl-dell:~/export_db$ mkdir log

srl@srl-dell:~/export_db$ sqlplus /nolog

SQL*Plus: Release 11.2.0.2.0 Production on Fri Feb 3 10:30:32 2017

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn sys/oracle as sysdba;

Connected.

SQL> CREATE OR REPLACE DIRECTORY MM_DIR AS '/home/srl/export_db/dump';

Directory created.

SQL> CREATE OR REPLACE DIRECTORY MM_DIR1 AS '/home/srl/export_db/log';

Directory created.

SQL> GRANT WRITE ON DIRECTORY MM_DIR TO PUBLIC ;

Grant succeeded.

SQL> exit;

Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

srl@srl-dell:~/export_db$ sudo chmod -R a+w+r+x /home/srl/export_db

[sudo] password for srl:

srl@srl-dell:~/export_db$ sudo chmod a+rwx /home/srl/export_db/dump

srl@srl-dell:~/export_db$ sudo chmod a+rwx /home/srl/export_db/log

srl@srl-dell:~/export_db$

Export button Process:  (Using Oracle apex 5 )

DECLARE

h1 NUMBER;

h2 NUMBER;

v_time VARCHAR2(32);

v_seq NUMBER;

v_schema VARCHAR2(32);

v_pool_id NUMBER;

BEGIN

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

v_schema:='MEET_MIN';

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','MM_DIR');

DBMS_DATAPUMP.add_file (handle => h1,

filename => v_schema||'_'||v_time||'.DMP',

directory => 'MM_DIR',

filetype =>

DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE,

reusefile => 0);

DBMS_DATAPUMP.add_file (handle => h1, filename => v_schema||'_'||v_time||'.LOG', directory => 'MM_DIR1', filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);

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);

DBMS_LOCK.SLEEP (60);

END;

Its giving problem in my system (Ubuntu OS) but my colleague system same steps working (Ubuntu OS).

I google it. Got few things i tried all, nothing fixed my problem.

Things i did:

Grant the Permissions, checked the directory path, re-creation of directory & setting path.

GRANT EXECUTE ON EXPORT_DB TO MEET_MIN

GRANT WRITE ON DIRECTORY MM_DIR TO MEET_MIN/PUBLIC ;

GRANT WRITE ON DIRECTORY MM_DIR1 TO MEET_MIN/PUBLIC ;

grant create session, create table, create procedure, exp_full_database, imp_full_database to MEET_MIN;

grant read, write on directory MM_DIR1 to MEET_MIN;

grant read, write on directory MM_DIR to MEET_MIN;

SQL> SELECT owner, directory_name, directory_path FROM all_directories where directory_name in ('MM_DIR','MM_DIR1');

OWNER       DIRECTORY_NAME

------------------------------ ------------------------------

DIRECTORY_PATH

--------------------------------------------------------------------------------

SYS       MM_DIR1

/home/srl/export_db/log

SYS       MM_DIR

/home/srl/export_db/dump

Details:

DB: Oracle 11g R2

Apex %

OS Ubuntu

Thank you in Advance.

This post has been answered by Er.RJ on Jan 16 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 13 2018
Added on Jan 13 2018
7 comments
1,125 views