[oracle@dbserver ~]$ impdp 'system/oracle@sztech1' directory=d1 dumpfile=hr.dmp schemas=hr remap_tablespace=%:ts_users
Import: Release 12.2.0.1.0 - Production on Thu Feb 23 19:31:30 2017
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Master table "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
import done in AL32UTF8 character set and AL16UTF16 NCHAR character set
export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
Warning: possible data loss in character set conversions
Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01": system/********@sztech1 directory=d1 dumpfile=hr.dmp schemas=hr remap_tablespace=%:ts_users
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
ORA-39083: Object type ROLE_GRANT failed to create with error:
ORA-01919: role 'MGMT_USER' does not exist
Failing sql is:
GRANT "MGMT_USER" TO "HR"
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
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
ORA-31684: Object type SEQUENCE:"HR"."SEQ_TEST" already exists
Processing object type SCHEMA_EXPORT/TABLE/TABLE
ORA-39083: Object type TABLE:"HR"."EXT_EMP_QUERY_RESULTS" failed to create with error:
ORA-06564: object IMP_DIR does not exist
Failing sql is:
CREATE TABLE "HR"."EXT_EMP_QUERY_RESULTS" ("FIRST_NAME" VARCHAR2(20 BYTE), "LAST_NAME" VARCHAR2(20 BYTE), "DEPARTMENT_NAME" VARCHAR2(20 BYTE)) ORGANIZATION EXTERNAL ( TYPE ORACLE_DATAPUMP DEFAULT DIRECTORY "IMP_DIR" LOCATION ( 'emp1.exp', 'emp2.exp', 'emp3.exp' ) )
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "HR"."EXP001" 137.5 KB 1164 rows
. . imported "HR"."COUNTRIES" 6.367 KB 25 rows
. . imported "HR"."DEPARTMENTS" 7.007 KB 27 rows
. . imported "HR"."DEPT" 5.476 KB 5 rows
. . imported "HR"."EMP" 6.312 KB 3 rows
. . imported "HR"."EMP5" 16.80 KB 107 rows
. . imported "HR"."EMPLOYEES" 16.80 KB 107 rows
. . imported "HR"."JOBS" 6.992 KB 19 rows
. . imported "HR"."JOB_HISTORY" 7.054 KB 10 rows
. . imported "HR"."LOCATIONS" 8.273 KB 23 rows
. . imported "HR"."REGIONS" 5.476 KB 4 rows
. . imported "HR"."EMP_1" 0 KB 0 rows
. . imported "HR"."EMP_TEST" 0 KB 0 rows
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."COUNTRIES" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT REFERENCES ON "HR"."COUNTRIES" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."LOCATIONS" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT REFERENCES ON "HR"."LOCATIONS" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."DEPARTMENTS" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."JOBS" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT REFERENCES ON "HR"."EMPLOYEES" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."EMPLOYEES" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."JOB_HISTORY" TO "OE"
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/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/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_SCHEMA_01" completed with 19 error(s) at Thu Feb 23 19:31:42 2017 elapsed 0 00:00:12
[oracle@dbserver ~]$
--确认pdb中数据
SQL> conn hr/hr@sztech1
Connected.
SQL> select table_name from tabs;
TABLE_NAME
--------------------------------------------------------------------------------
COUNTRIES
REGIONS
LOCATIONS
DEPARTMENTS
JOBS
EMPLOYEES
JOB_HISTORY
DEPT
EMP
EMP5
EXP001
TABLE_NAME
--------------------------------------------------------------------------------
EMP_TEST
EMP_1
13 rows selected.
SQL>
|