Import: Release 11.2.0.4.0 - Production on Wed May 31 18:19:36 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/******** directory=dir_dp dumpfile=emp.dmp remap_schema=scott:ML
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/DB_LINK
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "ML"."DEPT" 5.859 KB 1 rows
. . imported "ML"."EMP" 8.25 KB 6 rows
. . imported "ML"."BONUS" 0 KB 0 rows
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at Wed May 31 18:19:40 2017 elapsed 0 00:00:02
导入schema
SQL> drop user scott cascade;
User dropped.
SQL> create user scott identified by tiger;
User created.
SQL> grant resource,connect to scott;
Grant succeeded.
[oracle@enmo1 datadump]$ impdp system/oracle directory = dir_dp dumpfile = scott.dmp
Import: Release 11.2.0.4.0 - Production on Wed May 31 19:58:39 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/******** directory=dir_dp dumpfile=scott.emp
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/DB_LINK
ORA-31685: Object type DB_LINK:"SCOTT"."LK" failed due to insufficient privileges. Failing sql is:
CREATE DATABASE LINK "LK" CONNECT TO "HR" IDENTIFIED BY VALUES ':1' USING 'enmo1'
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "SCOTT"."DEPT" 5.929 KB 4 rows
. . imported "SCOTT"."EMP" 8.562 KB 14 rows
. . imported "SCOTT"."SALGRADE" 5.859 KB 5 rows
. . imported "SCOTT"."SL_BASE" 5.929 KB 4 rows
. . imported "SCOTT"."BONUS" 0 KB 0 rows
. . imported "SCOTT"."T1" 0 KB 0 rows
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 1 error(s) at Wed May 31 19:58:43 2017 elapsed 0 00:00:03
导入表空间
[oracle@enmo1 datadump]$ impdp system/oracle directory = dir_dp dumpfile = ts.dmp tablespace = users
导入数据库
[oracle@enmo1 datadump]$ impdp system/oracle directory = dir_dp dumpfile = db.dmp full = y