11、数据导出与导入

16 篇文章 1 订阅
16 篇文章 0 订阅

目录

一、expdp导出数据

二、impdp导入数据


一、expdp导出数据



1、建立目录
create or replace directory dir_name as 'D:\...';
2、授权读写权限给用户
grant read,write on directory dir_name to user_name;
3、expdp命令导出
expdp user_name/password_name directory=dir_name dumpfile=file_name.dmp {tables=table_name1,table_name2... |

schemas=schemas_name | tablespaces=tablespace_name |full=y}

tables:要导出的表的名字。
schemas:要导出的模式的名字。
tablespaces:表空间的名字。
full:全部数据库
P346其余的参数(如query添加导出的where条件子句。)
 

二、impdp导入数据


impdp user_name/password_name directory=dir_name dumpfile=file_name.dmp  {tables=table_name1,table_name2... |

schemas=schemas_name | tablespaces=tablespace_name |full=y} [remap_schema=schema1:schema2]

remap_schema:将模式1导入到模式2中,也就是跨模式的数据导入导出。(模式的概念参考用户与安全。模式与用户是一一对

应关系。)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值