linux读取dmp备份数据打开,Linux 中 Oracle dmp 文件导入导出(转)

远程工具连接到 Linux 进行操作,进行 Linux 上 dmp 文件的导入导出。

1.将用户 system 用户表导出到指定路径 D 盘

exp system/password@SID file=d:/daochu.dmp full=y

2.将用户 system 与 sys 用户的表导出到指定路径 D 盘

exp system/password@SID file=d:/daochu.dmp owner=(system,sys)

3.将用户 system 中的表 table_A、table_B 导出到指定路径 D 盘

exp system/password@SID file= d:/daochu.dmp tables=(table_A,table_B)

4.将用户 system 中的表 table1 中的字段 filed1 以"00"打头的数据导出

exp system/passwor@SID filed=d:/daochu.dmp tables=(table1) query=/" where filed1 like '00%'/"

对于压缩可以用 winzip 将 dmp 文件进行压缩,也可以在上面命令后面 加上 compress=y 来实现。

导出 DMP文件适用于大型数据库完整迁移,对迁移前后两者服务器数据库字符集要求一致,且对CLOB字段支持不太友好。

对于小数据的导出其实用 PLSQL 能做的更好,更快,导出的SQL也很直观。

5.将 D:/daochu.dmp 中的数据导入 TEST 数据库中。

imp system/password@SID file=d:/daochu.dmp

imp system/password@HUST full=y file=d:/data/newsmgnt.dmp ignore=y

上面命令如果出现问题,假设有的表已存在,对该表可以不进行导入,后面添加 ignore=y。

6.将 d:/daochu.dmp中的表table1 导入

imp system/passord@SID file=d:/daochu.dmp tables=(table1)

附:

nohup可以使进程后台执行,防止xshell断开时进程终止

导入大量的数据时:nohup imp lunzhiyu/123456@orcl full=y file=tb_rns_qq_name.dmp ignore=y &

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值