Remap_table、remap_tablespace、tables在impdp关于只导特定表的注意事项

remap_tableremap_tablespace多组对象转换的话,每组对象之间用逗号隔开

tables多张表时,每张表之间用逗号隔开

 

Remap_tablespace如果需要转换多个表空间,如A1转换成B1A2转换成B1,有如下两种方式

remap_tablespace=A1:B1 remap_tablespace=A2:B1

remap_tablespace= A1:B1, A2:B1

 

Remap_table如果需要转换多个表名

同一个schema的情况下,如A1转换成B1A2转换成B1,有如下两种方式

remap_table=A1:B1 remap_table=A2:B1

remap_table= A1:B1, A2:B1

 

 

impdp关于tablesremap_tables的一些注意事项

1.       expdp时写上tables=()表示导出某些表;impdp时不写tables条件表示导入dumpfile中的所有表,impdp时写tables=()条件表示只导入指定的表,当然如果tables=(dumpfile中的所有表)也就是导入dumpfile中的所有表;且如果用system执行impdp时则tables=()必须加上schema.表名,否则会默认是为system下面的表,会导致报错

 

2.       remap_table如果在同一个schema下进行,虽然不要加remap_schema但是remap_table冒号前面的表名一定要带schema信息,冒号后面的表名一定不能带schema信息

 

3.       remap_table如果在不同schema的情况下进行,如user1.A1转换成user2.B1user1.A2转换成user2.B1必须加remap_schemaremap_table冒号前面的表名一定要带schema信息,冒号后面的表名一定不能带schema信息

有如下两种方式

remap_table= user1.A1:B1 remap_table= user1.A2:B1 remap_schema= user1: user2

remap_table= user1. A1:B1, user1.A2:B1 remap_schema= user1: user2

 

 

schema只导出导入表并重命名的标准方式如下

expdptables写上schema.表名并用逗号隔开

impdp时需要remap_schema tables可写可不写,remap_table冒号前面的表名加上schema,冒号后面的表名不加schema

expdp system/123456 tables=t01.test101,t01.test102,t01.test103 directory=DATA_PUMP_DIR dumpfile=t011.dbf

 

impdp system/123456 remap_schema=t01:t_101 tables=t01.test101,t01.test102,t01.test103  remap_table=t01.test101:test10101,t01.test102:test102,t01.test103:test103 directory=DATA_PUMP_DIR dumpfile=t011.dbf


一个案例
A服务器导出用户ESB的一张分区表ESB_LOG
expdp system/123456 directory=DATA_PUMP_DIR dumpfile=ESB_LOG.dmp logfile=ESB_LOG.log tables=ESB.ESB_LOG

导入到B服务器的part用户,变成ESB_LOG(没有加tables=ESB.ESB_LOG,其实加不加无所谓,反正ESB_LOG.dm就是只有一张表ESB.ESB_LOG)
impdp system/123456 directory=DATA_PUMP_DIR dumpfile=ESB_LOG.dmp logfile=ESB_LOG.log remap_schema=ESB:part remap_tablespace=ESB07:part,ESB08:part,ESB09:part,ESB10:part,ESB11:part,ESB12:part,ESB:part

导入到B服务器的part用户,表名改为ESB_LOG2(加了tables=ESB.ESB_LOG,其实加不加无所谓,反正ESB_LOG.dm就是只有一张表ESB.ESB_LOG)
impdp system/123456 directory=DATA_PUMP_DIR dumpfile=ESB_LOG.dmp logfile=ESB_LOG2.log tables=ESB.ESB_LOGremap_schema=ESB:part remap_tablespace=ESB07:part,ESB08:part,ESB09:part,ESB10:part,ESB11:part,ESB12:part,ESB:part remap_table=ESB.ESB_LOG:ESB_LOG2

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30126024/viewspace-1967693/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/30126024/viewspace-1967693/

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值