实现数据导出

来源:互联网 发布:win10加速优化 编辑:程序博客网 时间:2024/05/23 12:16

导出模式

模式  参数  说明  操作角色full    full    导出整个数据库 exp_full_databaseschema  schmas  导出一个或多个用户模式中的数据和元数据 拥有exp_full_database角色,可以导出任何模式,否则只能导出自己的模式table   tables  导出一组特定表 拥有exp_full_database角色,可以导出任何模式的表,否则只能导出自己的模式的表tablespace  tablespaces 导出一个或多个表空间中的数据  exp_full_databasetransportable_tablespace    transportable_tablespaces   导出表空间中对象元数据 exp_full_database

这里写图片描述

案列
1 按表名导,连接用户scott,导出scott用户的表emp,dept,导出的文件名expdp.dmp,导出的目录mypump
expdp scott/123 directory=mypump dumpfile=expdp.dmp tables=emp,dept;

2 按用户导,导出scott用户模式中的数据和元数据,导出的文件名expdp.dmp,导出的目录mypump
expdp scott/123 directory=mypump dumpfile=expdp.dmp schemas=scott ;

3 按表空间导,导出users表空间中的数据和元数据,导出的文件名expdp.dmp,导出的目录mypump
expdp scott/123 directory=mypump dumpfile=expdp.dmp tablespaces=users;

4 导整个数据库
expdp scott/123 directory=mypump dumpfile=expdp.dmp full=y;