逻辑导出导入有用方法

一、逻辑导出导入使用案例

1、普通用户导出其它模式的表

1)创建用户test_user

create USER test_dexp IDENTIFIED by testdexp;

grant create SESSION to test_dexp;

2)使用test_dexp导出RESOURCES.EMPLOYEE_DEPARTMENT表

dexp test_dexp/testdexp file=table1.dmp log=table1.log tables=RESOURCES.EMPLOYEE_DEPARTMENT;

 

说明权限不够,授予如下权限

grant select on RESOURCES.EMPLOYEE_DEPARTMENT to test_dexp;

grant select for dump on RESOURCES.EMPLOYEE_DEPARTMENT to test_dexp;

再次导出

 

发现成功导出数据。

2、验证是否支持跨模式导入

在次,直接使用SYSDBA演示

1)导出模式TEST

dexp sysdba/SYSDBA file=schematest.dmp log=schematest.log schemas=TEST;

 

2)新建模式

create schema testdimp;

3)导入到testdimp模式下

dexp sysdba/SYSDBA file=schematest.dmp log=schematest.log remap_schema=TEST:TESTDIMP;

 

可以看到能够导入

 

3、验证是否支持部分表导入

首先删除testdimp模式,创建空模式testdimp

drop schema testdimp cascade;

导入一张表

dimp sysdba/SYSDBA file=schematest.dmp log=schematest.log remap_schema=TEST:TESTDIMP tables=TEST.T01_TRI_10000;

 

发现能导入。

 

4、验证表按条件导出

dexp sysdba/SYSDBA tables=RESOURCES.EMPLOYEE_DEPARTMENT file=test2.dmp log=test2.log query="WHERE STARTDATE > to_date('2001-02-01')";

 

发现能导出。

达梦数据库 - 新一代大型通用关系型数据库 | 达梦在线服务平台

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zjshaha

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值