impdp 使用network_link 迁移数据

create directory EXPDP as '/backup/expdp';

grant read,write on directory EXPDP tosystem;

 

将远端导出的备份集 按照某schema导入到新的schema and 新的shcema用户对应的表空间


先导出

expdp system/Oracle2015  directory=EXPDP schemas=platdumpfile=20151227expplat.dmp logfile=20151227expplat.log

 

目标库导入

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

impdp system/oracle  directory=EXPDP dumpfile=20151227expplat.dmpschemas=center remap_schema=center:centernew tablespace=plattbs:centerlogfile=imp1.log

 

 

同一个数据库,将用户A的所有对象 导入到B用户及保存在B的默认表空间

0、add the tnsname

1、Create public Database Link link_self Connect To system IdentifiedBy oracle Using 'rpdm';  create the  link using system user.

2、create tablespace new datafile '+DATA' size 50M;

3、create user new identified by new default tablespace new;

4、export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

5、impdp system/oracle directory=EXPDP network_link=link_selfschemas=centernew remap_schema=centernew:new remap_tablespace=center:new  logfile=test01.log

6、alter user centernew account lock;

7、alter tablespace center offline;

 

同一个数据库,将A用户的对象使用network_link导出。

0、add the tnsname

1、Create public Database Link link_self Connect To system IdentifiedBy oracle Using 'rpdm';  create the  link using system user.

2、create tablespace new datafile '+DATA' size 50M;

3、create user new identified by new default tablespace new;

4、export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

5、expdp system/oracle directory=EXPDP network_link=link_selfschemas=new dumpfile=expnew.dmp logfile=expnew.log

 

等效于这个

expdp system/oracle directory=EXPDPschemas=new dumpfile=expnew.dmp logfile=expnew.log

 

 

将远端数据库中的schemas导入到本地中

1、add tns prodracdb

2、Create public Database Link link_prod1011 Connect To systemIdentified By RPal218system Using 'prodracdb';

3、export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

4、impdp system/Oracle2015 directory=EXPDP network_link=link_prod1011PARALLEL=16 schemas=bossdd,accountxx,chargeaa logfile=201513061946balldb.log

一定要注意

chemas=bossdd,accountxx,chargeaa 中的用户 在目标数据库(当前)中是没有的。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值