码迷,mamicode.com
首页 > 其他好文 > 详细

关于exp和imp

时间:2014-09-22 23:16:23      阅读:261      评论:0      收藏:0      [点我收藏+]

标签:数据   sp   问题   c   log   r   数据库   bs   res   

exp和imp相比于rman或者其他第三方软件已经不是作为主要备份工具了,但是个人认为作为一个转储工具还是比较方便的。

导出整个数据库

exp system/manager@orcl file=e:\xx.dmp log=e:\xx.log compress=n buffer=100000,full=y

导出用户schema

exp system/manager@orcl file=e:\xx.dmp buffer=1000000 owner=scott 

导出表

exp system/manager@orcl file=e:\xx.dmp tables=(emp,dept) owner=scott

导入

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

关于exp和imp

标签:数据   sp   问题   c   log   r   数据库   bs   res   

原文地址:http://www.cnblogs.com/allensendi/p/3986652.html

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