Data Pump Import - error in import (impdp) using given DUMP file
956277Aug 16 2012 — edited Aug 17 2012I have Oracle XE Database 11g Express Edition and has different users (schemas) on it. I need to do import on my dbase and was given the DUMP file and import command how to do it.
impdp system/admin@XE DUMPFILE=IPS_SWISSVASC_PART_3TAB.DMP.
I need to know am I doing something wrong or the given DUMP file (export) is not correct?
Thanks
Here are all attempts with logs:
I read from Oracle docs all about Data Pump Import and Export - and tested the both command - working fine:
EXPORT - OK:
C:\>expdp SYSTEM/admin SCHEMAS=hr DIRECTORY=dmpdir DUMPFILE=hr_schema.dmp LOGFILE=expschema.log
IMPORT - OK:
C:\>impdp SYSTEM/admin SCHEMAS=hr DIRECTORY=dmpdir DUMPFILE=hr_schema.dmp REMAP_SCHEMA=hr:jaca TABLE_EXISTS_ACTION=replace LOGFILE=imphrschema.log
Then I tried to do import on the given file, and could not succeed. Here are some attempts:
C:\>impdp system/admin@XE DUMPFILE=IPS_SWISSVASC_PART_3TAB.DMP
Import: Release 11.2.0.2.0 - Production on Thu Aug 16 15:32:38 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/********@XE DUMPFILE=IPS_SWISSVA
SC_PART_3TAB.DMP
Processing object type TABLE_EXPORT/TABLE/TABLE
ORA-39083: Object type TABLE:"IPS_SWISSVASC"."CASE" failed to create with error:
ORA-01918: user 'IPS_SWISSVASC' does not exist
Failing sql is:
CREATE TABLE "IPS_SWISSVASC"."CASE" ("CASE_ID" NUMBER NOT NULL ENABLE, "CASE_COD
E" VARCHAR2(50 BYTE) NOT NULL ENABLE, "CASE_CODE_RN" VARCHAR2(1000 BYTE) NOT NUL
L ENABLE, "CASE_STATUS_ADMIN_SUM" NUMBER(38,0) NOT NULL ENABLE, "CASE_STATUS_SUM
" NUMBER(38,0) NOT NULL ENABLE, "CASE_LOCKING_IPS_USER_ID" NUMBER, "CASE_LOCKING
_DATETIME" TIMESTAMP (6), "CASE_INTEGRITY_SUM"
ORA-39083: Object type TABLE:"IPS_SWISSVASC"."ENCOUNTER" failed to create with e
rror:
ORA-01918: user 'IPS_SWISSVASC' does not exist
Failing sql is:
CREATE TABLE "IPS_SWISSVASC"."ENCOUNTER" ("ENCOUNTER_ID" NUMBER NOT NULL ENABLE,
"ENCOUNTER_NAME" VARCHAR2(150 BYTE), "ENCOUNTER_DESCRIPTION" VARCHAR2(1000 BYTE
), "CREATED_BY_IPS_USER_PV_ACT" NUMBER NOT NULL ENABLE, "CREATION_DATE" TIMESTAM
P (6) NOT NULL ENABLE, "BELONGS_TO_CASE" NUMBER NOT NULL ENABLE, "ENCOUNTER_TYPE
_REF" NUMBER NOT NULL ENABLE, "ENCOUNTER_
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 2 error(s) at 15:33:06
-------------------------------------
*C:\> impdp SYSTEM/admin SCHEMAS=IPS_SWISSVASC DIRECTORY=dmpdir DUMPFILE=IPS_SWISSVASC_PART_3TAB.DMP REMAP_SCHEMA=IPS_SWISSVASC:jaca TABLE_EXISTS_ACTION=replace LOGFILE=ipsschema.log*Import: Release 11.2.0.2.0 - Production on Fri Aug 17 00:09:49 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - Productio
n
ORA-31655: no data or metadata objects selected for job
ORA-39039: Schema expression " IN ('IPS_SWISSVASC')" contains no valid schemas.
Master table "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01": SYSTEM/******** SCHEMAS=IPS_SWISSVASC
DIRECTORY=dmpdir DUMPFILE=IPS_SWISSVASC_PART_3TAB.DMP REMAP_SCHEMA=IPS_SWISSVAS
C:jaca TABLE_EXISTS_ACTION=replace LOGFILE=ipsschema.log
Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully completed at 00:10:35
--------------------------------------------------------
The person I worked for replied this on my question about export parameters and user-scema name:
There is no need to know the schema name, believe me. What do you want to do whit this information?
But, if you are happy with it no problem :
SCHEMA : IPS_SWISSVASC
DUMPFILE allready delivered.
Finally , this will work :
a) check your current dmpdir by issuing the following SQL Stamenet using sql commander (and be shure that you are logged in as the SYSTEM user)
select * from dba_directories
b) copy thje dumpfile to the current dmpdir
c) issue the following command in the cmd shell
C:\>impdp system/admin@XE DUMPFILE=IPS_SWISSVASC_PART_3TAB.DMP
------------------------------------------------------------------------------------
I also made this test and it's working:
This import was done on already created schema - all tables already exists and the hr user.
*C:\oraclexe\app\oracle\admin\XE\dpdump>impdp system/admin@xe DUMPFILE=hr_schema.*
*DMP*
Import: Release 11.2.0.2.0 - Production on Fri Aug 17 04:26:37 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - Productio
n
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/********@xe DUMPFILE=hr_schema.D
MP
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"HR" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
ORA-31684: Object type SEQUENCE:"HR"."LOCATIONS_SEQ" already exists
ORA-31684: Object type SEQUENCE:"HR"."DEPARTMENTS_SEQ" already exists
ORA-31684: Object type SEQUENCE:"HR"."EMPLOYEES_SEQ" already exists
Processing object type SCHEMA_EXPORT/TABLE/TABLE
ORA-39151: Table "HR"."COUNTRIES" exists. All dependent metadata and data will b
e skipped due to table_exists_action of skip
ORA-39151: Table "HR"."REGIONS" exists. All dependent metadata and data will be
skipped due to table_exists_action of skip
ORA-39151: Table "HR"."LOCATIONS" exists. All dependent metadata and data will b
e skipped due to table_exists_action of skip
ORA-39151: Table "HR"."DEPARTMENTS" exists. All dependent metadata and data will
be skipped due to table_exists_action of skip
ORA-39151: Table "HR"."JOBS" exists. All dependent metadata and data will be ski
pped due to table_exists_action of skip
ORA-39151: Table "HR"."EMPLOYEES" exists. All dependent metadata and data will b
e skipped due to table_exists_action of skip
ORA-39151: Table "HR"."JOB_HISTORY" exists. All dependent metadata and data will
be skipped due to table_exists_action of skip
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
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/COMMENT
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
ORA-31684: Object type PROCEDURE:"HR"."ADD_JOB_HISTORY" already exists
ORA-31684: Object type PROCEDURE:"HR"."SECURE_DML" already exists
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
ORA-31684: Object type VIEW:"HR"."EMP_DETAILS_VIEW" already exists
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 14 error(s) at 04:26:59