oracle数据库导入imp导出exp
数据导出:
1.数据库:orcl 用户:test 密码:123456 导出路径:d:\pms.dmp 全库导出
exp test/123456@orcl file=d:\pms.dmp full=y;
2.按用户导出:test、sys用户
exp test/123456@orcl file=d:\pms.dmp owner=(test,sys);
3.按数据表导出b2b_pms_own、b2b_pms_rating
exp test/123456@orcl file=d:\pms.dmp tables=(b2b_pms_rating,b2b_pms_own);
4.导出b2b_pms_own中的字段id以“00”打头的数据
exp test/123456@orcl file=d:\pms.dmp tables=(b2b_pms_own) query=\"where id like '00'\";
是否压缩: compress=y
5.exp user/pass@orcl full=y file=d:\adn.dmp log=d:\123.log
说明:导出的是当前user的数据,如果该user拥有dba权限,则导出所有数据
6.远程导出
exp test/123456@IP:1521/orcl file=d:\pms.dmp full=y;
数据导入
1.将d:\pms.dmp中的数据导入orcl库
imp test/123456@orcl file=d:\pms.dmp
如果表存在则报错可以配置参数忽略:ignore=y
2.将d:\pms.dmp中b2b_pms_own导入
imp test/123456@orcl file=d:\pms.dmp tables=(b2b_pms_own);
3.同名用户数据导入
imp test/123456@orcl file=d:\pms.dmp log=d:\pms.log full=y;
4.不同名用户导入
imp test/123456@orcl fromuser=sm touser=test file=d:\pms.dmp log=d:\pms.log;




