Expdp and impdp 倒入导出例子

--using expdp and impdp to export data from one db to other db
--1. create the  same schema, tablespace 
--2. if the two db version are different, please add target db version when do expdp and impdb

----3. create directory  on source db 
create directory dpdata1 as '/temp/dump';
--4.check directory in db
select * from dba_directories;
--5. grant a user  permission to directory
grant read,write on directory dpdata1 to user_name;


-- 6. export user data 
EXPDP USERID='SYS/test@prd as sysdba' schemas=user_s directory=dpdata1 PARALLEL=4 FILESIZE=200M dumpfile=data_file_%u.dmp logfile=export.log version=11.2.0.4.0 ;


-- 7.copy dumpfile to target db directory folder, and create the same directory in target db


---8. import data into target db, if  directory didn't be created on share disk, need to cluster=no to avoid error.


IMPDP USERID='SYS/test@prd as sysdba' schemas=user_s directory=dpdata1 PARALLEL=4  dumpfile=data_file_%u.dmp cluster=no logfile=import.log version=11.2.0.4.0;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值