ITPub博客

首页 > 应用开发 > IT综合 > Data Pump expdp与impdp

Data Pump expdp与impdp

原创 IT综合 作者:brightking716 时间:2010-12-09 16:41:45 0 删除 编辑

从客户方拿到一个expdat.dmp文件,需要导入一个新的数据库中进行测试,从export.log中看出是从11gR2通过expdp导出的,其中包括了多个schemas,

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01": system/******** directory=pumpdir dumpfile=expdat.dmp schemas=chamoa,dbadminb,iportalc,reporterd,sysclie version=11.1

现在需要将daadminb这个schema导入到新数据库里的一个user ngabc。

[@more@]

1. Create logic directory by system

SQL> create directory dpdata1 as 'd:dbdump';

Also, You can check:

SQL> select * from dba_directories;

2.Grant directory privelege

SQL> grant read, write on directory dpdata1 to public;

3. Import the dump file

> impdp system/passwd directory=dpdata1 dumpfile=expdat.dmp =DBADMINB:NGABC

Data Pump与exp/imp的参数设置上面还是有很大区别的,没有fromuser和touser参数,REMAP_SCHEMA可以定义用户的切换,其格式为:
remap_schema=old_schema_name:new_schema_name

另外,如果没有创建user,Data Pump会自动帮助创建

Data Pump还有很多参数设置,满足很多需求,可以> exp/imp –help,或者参考以下:

Reference:

http://407882.blog.51cto.com/397882/150111

http://hi.baidu.com/edeed/blog/item/9e3b9e2fb2209c3b1f308915.html

http://www.eygle.com/archives/2009/09/oracle_impdp_ig.html

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

请登录后发表评论 登录
全部评论