浅谈exp与expdp的区别

来源:互联网 发布:mks真空计软件 编辑:程序博客网 时间:2024/06/05 21:18
1:把用户usera的对象导到用户userb,用法区别在于fromuser=usera touser=userb ,remap_schema='usera':'usera' 。例如

imp system/passwd fromuser=usera touser=userb file=/oracle/exp.dmp log=/oracle/exp.log;
impdp system/passwd directory=expdp dumpfile=expdp.dmp remap_schema='usera':'userb' logfile=/oracle/exp.log;

2:更换表空间,用exp/imp的时候,要想更改表所在的表空间,需要手工去处理一下,
如alter table xxx move tablespace_new之类的操作。
用impdp只要用remap_tablespace='tabspace_old':'tablespace_new'

3:当指定一些表的时候,使用exp/imp 时,tables的用法是 tables=('table1','table2','table3')。
expdp/impdp的用法是tables='table1','table2','table3'

4:
是否要导出数据行
exp (ROWS=Y 导出数据行,ROWS=N 不导出数据行)
expdp content(ALL:对象+导出数据行,DATA_ONLY:只导出对象,METADATA_ONLY:只导出数据的记录)


注:1、IMP只适用于EXP导出文件,不适用于EXPDP导出文件;IMPDP只适用于EXPDP导出文件,而不适用于EXP导出文件

      2、expdp/impdp是数据泵,是Oracle 10g 以后才有,expdp只能在服务器执行;导入导出速度比较快

原创粉丝点击