加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Oracle数据导入导出基本操作示例

发布时间:2020-12-12 15:48:05 所属栏目:百科 来源:网络整理
导读:Oracle数据导入导出基本操作示例 数据导出 a.将数据库orcl完全导出,用户名user 密码password 导出到D:dc.dmp中 exp user/password@orcl file=d:dc.dmp full=y full=y 表示全库导出 b.将数据库中user1和user2用户导出 exp user/password@orcl file=d:dc.d

Oracle数据导入导出基本操作示例


  1. 数据导出

    a.将数据库orcl完全导出,用户名user 密码password 导出到D:dc.dmp中

    exp user/password@orcl file=d:dc.dmp full=y

    full=y 表示全库导出


    b.将数据库中user1和user2用户导出

    exp user/password@orcl file=d:dc.dmp owner=(user1,user2)

    full方式可以备份所有用户的数据库对象,包括表空间、用户信息等,owner=XX只能备份指定用户的对象.


    c.将用户user中表user_operator,user_id导出

    exp user/password@orcl file=d:dc.dmp tables=(user_operator,user_id)

    tables=xx 表示备份相关表


d.按条件导出数据

exp user/password@orcl file=d:dc.dmptables=(user_id)query=’where dept_id=1’

e.只导出表,不导出数据

exp user/password@orcl file=d:dc.dmp tables=(user_id)rows=N


2.数据导入

a.将D:dc.dmp中导入到数据库中

impuser/password@orcl file=d:dc.dmpignore=y

ignore=y 表示忽略错误 因为有的表已经存在,然后它就报错,对该表就不进行导入。


b.将d:daochu.dmp中的表user_id导入

impuser/password@orcl file=d:dc.dmp tables=(user_id)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读