打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
使用impdp命令迁移数据库 ? 半瓶

在不同的平台间迁移数据库,不能使用RMAN的备份来恢复,除了用导出dmp文件再导入外,还可以使用impdp命令直接在目的数据库进行导入。

首先建立供数据库使用的Directory目录:

[oracle@rac1 ~]$ LANG=en

[oracle@rac1 ~]$ mkdir /tmp/exp_dir

建立Directory:

[oracle@rac1 ~]$ exportNLS_LANG=AMERICAN_AMERICA.ZHS16GBK

[oracle@rac1 ~]$ sqlplus " / as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Oct 28 16:16:10 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bitProduction
With the Partitioning, Real Application Clusters, OLAP and Data Miningoptions

SQL> create or replace directory  exp_dir as '/tmp/exp_dir';

建立dblink以连接到源库:

SQL> create public database link dbbak89 connectto banping identified by banping using'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.89)(PORT=1521))(CONNECT_DATA=(SID=bakdb)))';

在目标库建立banping用户,赋予足够的权限,然后执行impdp命令从源库导入数据:

[oracle@rac1 ~]$ impdp system/banping SCHEMAS=(banping)directory=exp_dir network_link=dbbak89 logfile=exp_dir:impdp.log;

这样就避免了导出再导入dmp文件的操作,提高了效率。

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
oracle 11g 新特性【BUG】 给exp/imp带来的郁闷
Oracle备份与恢复介绍(物理备份与逻辑备份)
数据库的导入与导出,exp/imp与expdp/impdp的使用
oracle expdb impdb命令
.Net程序员学用Oracle系列(19):导出、导入(备份、还原)
[Oracle数据库迁移]使用expdp/impdp进行迁移
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服