Exporting and Importing Objects Using Oracle Data Pump(2.impdp)

1.导入表的DDL数据:

[lubinsu@localhost db_files]$ impdp lubinsu/lubinsu directory=dpump_dir01 dumpfile=lubinsu.dmp sqlfile=dpump_dir02:lubinsu.sql tables=latn_area_info

Import: Release 10.2.0.1.0 - Production on Thursday, 02 May, 2013 22:14:13

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Master table "LUBINSU"."SYS_SQL_FILE_TABLE_01" successfully loaded/unloaded
Starting "LUBINSU"."SYS_SQL_FILE_TABLE_01":  lubinsu/******** directory=dpump_dir01 dumpfile=lubinsu.dmp sqlfile=dpump_dir02:lubinsu.sql tables=latn_area_info 
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "LUBINSU"."SYS_SQL_FILE_TABLE_01" successfully completed at 22:14:15

2.这样我们将latn_area_info的DDL信息都导入到了lubinsu.sql文件中,该文件放在目录对象dpump_dir02中
关于如何创建目录对象,请见上一篇文章:Exporting and Importing Objects Using Oracle Data Pump(1.expdp)

3.将表导入到其他用户下:
[lubinsu@localhost db_files]$ impdp scott/lubinsu directory=dpump_dir01 dumpfile=lubinsu.dmp tables=lubinsu.latn_area_info REMAP_SCHEMA=lubinsu:scott  

Import: Release 10.2.0.1.0 - Production on Thursday, 02 May, 2013 22:29:00

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Master table "SCOTT"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "SCOTT"."SYS_IMPORT_TABLE_01":  scott/******** directory=dpump_dir01 dumpfile=lubinsu.dmp tables=lubinsu.latn_area_info REMAP_SCHEMA=lubinsu:scott 
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "SCOTT"."LATN_AREA_INFO"                    16.11 KB      14 rows
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SCOTT"."SYS_IMPORT_TABLE_01" successfully completed at 22:29:04

4.这里有个参数remap_table在10g中并没有这个参数,11g的数据泵中新增了该功能,但是 1106上 有bug无法使用

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值