impdp 使用network_link 迁移数据
2015-12-29 19:35
726 查看
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 中的用户 在目标数据库(当前)中是没有的。
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 中的用户 在目标数据库(当前)中是没有的。
相关文章推荐
- nginx配置location
- AVPlayer视频播放
- Oracle EBS交叉币种(4)-应付交叉币种
- 数据库乐观锁 & 悲观锁
- 2015年12月29日实习总结
- 【创建动态网站-第0讲】专业名词解释
- 管理界面的建立(自学习之二)
- linux系统的7种运行级别
- Unity3D研究院之构建游戏框架与导出IOS项目(一)
- Python编写数据结构中的二分查找
- x86汇编 知识汇总
- 【星路演】DeviceOne:跨平台APP开发平台
- 【项目】——ORACLE数据库中ROWNUM应用
- 查看自己电脑可以支持的最大内存量
- SQL语句
- UVA10344 23 out 5
- Reflector反编译.NET文件后修复
- 四大组件之BroadcastReceiver(广播)
- 在VC6中基于dll开发插件用于各种图片显示(BMP/TGA/JPG/GIF/PNG/TIF/ICO/WMF/EMF/...)
- <<Hive编程指南>>读书笔记