『ORACLE』数据泵Data Pump中impdp导入(11g)

[oracle@enmo1 datadump]$ impdp system/oracle directory = dir_dp dumpfile = emp.dmp remap_schema = scott:ML
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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值