Skip to Main Content

Database Software

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!

DBMS_DATAPUMP Import error ORA-39002

user581431Feb 15 2010 — edited Mar 1 2010
Please help with this datapump import issue.

Database is 10gR2. I try to import a file using DBMS_DATAPUMP created in 11g. I am logged in with a DBA account. The dump file is made compatible with 10g.

declare

l_dp_handle NUMBER;

begin

l_dp_handle := DBMS_DATAPUMP.open(
operation => 'IMPORT',
job_mode => 'TABLE',
remote_link => NULL,
job_name => 'SAMSE_IMPORT',
version => 'COMPATIBLE');

DBMS_DATAPUMP.add_file(
handle => l_dp_handle,
filename => 'AHO_DAY.DMP',
directory => 'SAMSE_TEST_DIR');

DBMS_DATAPUMP.METADATA_FILTER(
handle => l_dp_handle,
name => 'NAME_LIST',
value => '(''CONTACTINT'')');

DBMS_DATAPUMP.METADATA_REMAP (
handle => l_dp_handle,
name => 'REMAP_TABLESPACE',
old_value => 'REPORTD',
value => 'SAMSE_LD_TBL');

DBMS_DATAPUMP.SET_PARAMETER(
handle => l_dp_handle,
name => 'TABLE_EXISTS_ACTION',
value => 'TRUNCATE');

DBMS_DATAPUMP.start_job(l_dp_handle);

DBMS_DATAPUMP.detach(l_dp_handle);
END;

It gives this error:
ERROR at line 1:
ORA-39002: invalid operation
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4882
ORA-06512: at line 38

When I run IMPDP, logged in as the same DBA username, it successfully imports.

Processing object type SCHEMA_EXPORT/TABLE/TABLE
ORA-39153: Table "REPORT"."CONTACTINT" exists and has been truncated. Data will be loaded but all dependent metadata will be skipped due to table_exists_action of truncate
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "REPORT"."CONTACTINT" 24.22 KB 270 rows
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/AUDIT_OBJ
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

This is the parfile:

FULL=N
dumpfile=SAMSE_TEST_DIR:aho_day.dmp
logfile = SAMSE_TEST_DIR:aho_day.log
job_name=SAMSE_TEST
tables = CONTACTINT
TABLE_EXISTS_ACTION=TRUNCATE
REMAP_TABLESPACE = REPORTD:SAMSE_LD_TBL
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 29 2010
Added on Feb 15 2010
11 comments
6,654 views