create directory mydata as "逻辑目录路径"; 例如: create directory mydata as "/data/oracle/oradata/mydata"; grant
userid=test/test --导出的用户,本地用户!!
directory=dmpfile --导出的逻辑目录,一定要在oracle中创建完成的,并且给用户授权读写权限
dumpfile=xx.dmp --导出的数据文件的名称,如果想在指定的位置的话可以写成dumpfile=/home/oracle/userxx.dmp
logfile=xx.log --日志文件,如果不写这个参数的话默认名称就是export.log,可以在本地的文件夹中找到
schemas=userxx --使用dblink导出的用户不是本地的用户,需要加上schema来确定导出的用户,类似于exp中的owner,但还有一定的区别
EXCLUDE=TABLE:"IN("T1","T2","T3")" --exclude 可以指定不导出的东西,table,index等,后面加上不想导出的表名
network_link=db_local --这个参数是使用的dblink来远程导出,需要指定dblink的名称
列出一些场景:
1)导出用户及其对象
expdp scott/tiger@orcl schemas=scott dumpfile=expdp.dmp directory=dump_dir logfile=expdp.log;
2)导出指定表
expdp scott/tiger@orcl tables=emp,dept dumpfile=expdp.dmp directory=dump_dir logfile=expdp.log;
3)按查询条件导
expdp scott/tiger@orcl directory=dump_dir dumpfile=expdp.dmp tables=empquery="where deptno=20" logfile=expdp.log;
4)按表空间导
expdp system/manager@orcl directory=dump_dir dumpfile=tablespace.dmp tablespaces=temp,example logfile=expdp.log;
5)导整个数据库
expdp scott/123@127.0.0.1/orcl directory=dump_dir dumpfile=ly.dmp full=y logfile=expdp.log;
6)导入指定表
impdp scott/tiger@orcl directory=dump_dir dumpfile=expdp.dmp table_exists_action=replace;
--结束END--
本文标题: expdp/impdp 数据泵导入导出
本文链接: https://www.lsjlt.com/news/6965.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-10
2024-05-10
2024-05-10
2024-05-10
2024-05-10
2024-05-10
2024-05-10
2024-05-10
2024-05-10
2024-05-10
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0