码迷,mamicode.com
首页 > 数据库 > 详细

oracle中导入导出dmp数据库文件

时间:2015-06-14 16:34:26      阅读:127      评论:0      收藏:0      [点我收藏+]

标签:

数据的导出:
  1、将数据库szda完全导出,用户名sa密码sa123 导出到D:\daochu.dmp中
              exp sa/sa123@szda file=d:\daochu.dmp full=y
  2、将数据库中sa用户与sys用户的表导出
              exp sa/sa123@szda file=d:\daochu.dmp owner=(sa,sys)
  3、将数据库中的表table_1、table_2导出
              exp sa/sa123@szda file= d:\daochu.dmp tables=(table_1,table_2)
  4、将数据库中的表table_1中的字段filed1以"00"打头的数据导出
              exp sa/sa123@szda file=d:\daochu.dmp tables=(table_1) query=\" where filed1 like ‘00%‘\

数据的导入:
  1、将D:\daochu.dmp 中的数据导入szda数据库中。
   imp sa/sa123@szda file=d:\daochu.dmp
   imp sa/sa123@szda full=y file=file= d:\daochu.dmp  ignore=y
   上面可能有点问题,因为有的表已经存在,然后它就报错,对该表就不进行导入,在后面加上 ignore=y 就可以了。
  2、将d:\daochu.dmp中的表table_1 导入
  imp sa/sa123@szda file=d:\daochu.dmp tables=(table_1)

oracle中导入导出dmp数据库文件

标签:

原文地址:http://www.cnblogs.com/gg180/p/4575191.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!