My Oracle Support Banner

Streams Setup - EM Grid Control Generated Datapump Exp/Imp Script Fails With Ora-39001 Or Ora-39002 (Doc ID 845749.1)

Last updated on SEPTEMBER 23, 2021

Applies to:

Enterprise Manager for Oracle Database - Version 10.2.0.1 to 10.2.0.4 [Release 10.2]
Oracle Cloud Infrastructure - Database Service
Information in this document applies to any platform.
This problem can occur on any platform.

Symptoms

-- Problem Statement:
Setting up streams between two Oracle10.2.0.x databases using the scripts generated by Enterprise Manager Grid Control 10.2.0.4.0

The datapump Export/Import operation fails :


DECLARE
*
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 2953
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4603
ORA-06512: at line 11


Following is the script being executed :

ACCEPT strm_pwd_src PROMPT 'Enter Password of Streams Admin "strmadmin" at
Source : ' HIDE
ACCEPT strm_pwd_dest PROMPT 'Enter Password of Streams Admin "strmadmin" at
Destination : ' HIDE
connect "STRMADMIN"/&strm_pwd_dest@"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521)))(CONNECT_DATA=(SID=SID1)(SERVER=DEDICATED)))";
set serverout on;
DECLARE
handle1 number;
ind number;
percent_done number;
job_state VARCHAR2(30);
le ku$_LogEntry;
js ku$_JobStatus;
jd ku$_JobDesc;
sts ku$_Status;
BEGIN
handle1 := DBMS_DATAPUMP.OPEN('IMPORT','SCHEMA', 'LBTRCALI');
DBMS_DATAPUMP.ADD_FILE(handle1, 'StreamImport_1244493018308.log',
'stream_dir', '', DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);
DBMS_DATAPUMP.SET_PARAMETER(handle1, 'FLASHBACK_SCN', 14174339542);
DBMS_DATAPUMP.METADATA_FILTER(handle1, 'SCHEMA_EXPR', 'IN (''SCOTT'')');
DBMS_DATAPUMP.SET_PARAMETER(handle1, 'INCLUDE_METADATA', 1);
DBMS_DATAPUMP.START_JOB(handle1);
percent_done :=0;
job_state := 'UNDEFINED';
while (job_state != 'COMPLETED') and (job_state != 'STOPPED') loop
dbms_datapump.get_status(handle1, dbms_datapump.ku$_status_job_error +
dbms_datapump.ku$_status_job_status + dbms_datapump.ku$_status_wip,-1,job_state,
sts);
js := sts.job_status;
if js.percent_done != percent_done
then
dbms_output.put_line('*** Job percent done = ' || to_char(js.percent_done))
;
percent_done := js.percent_done;
end if;
if(bitand(sts.mask, dbms_datapump.ku$_status_wip) != 0)
then
le := sts.wip;
else
if(bitand(sts.mask,dbms_datapump.ku$_status_job_error) != 0)
then
le := sts.error;
else
le := null;
end if;
end if;
if le is not null
then
ind := le.FIRST;
while ind is not null loop
dbms_output.put_line(le(ind).LogText);
ind := le.NEXT(ind);
end loop;
end if;
end loop;
dbms_output.put_line('Job has completed');
dbms_output.put_line('Final job state = ' || job_state);
dbms_datapump.detach(handle1);
END;
/

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.