ITPub博客

首页 > Linux操作系统 > Linux操作系统 > EXP/IMP总结心得(还需整理一下)

EXP/IMP总结心得(还需整理一下)

原创 Linux操作系统 作者:shouyang1314 时间:2012-11-09 19:55:49 0 删除 编辑

EXP/IMP总结心得

表级<用户级<表空间级<数据库级  一级比一级大(默认处于用户级)

exp system/oracle file=a.dmp 默认是处于用户级,导出的是system用户下的所有对象,a.dmp保存在当前的目录下面(相对路径,如果有特定要求路径,可以使用绝对路径)

exp system/oracle wner=hr file=a.dmp  用户级,导出hr用户下的所有对象

exp 

用户级:owner

表级:tables

 数据库级:full=y

imp

用户级 fromuser touser

表级   tables

数据库级 full=y

 

EXP   userid  owner:owner的优先级比userid高,如果没有owner,默认useid用户是owner,对userid用户操作

例如:

用户级

exp system/oracle wner=hr file=a.dmp 等同于exp hr/hr file=a.dmp  从hr用户中导出来

exp system/oracle file=c.dmp   从system用户中导出来

表级

exp hr/hr file=e.dmp tables=lsy 

exp system/oracle file=f.dmp tables=lsy

因为hr属于system的用户,所以使用hr建立的表也可以使用system用户导出。

表级的命令中不能包含有owner参数。

 

IMP   userid  fromuser touser

用户级别必须要有fromuser touser两个参数

表级别可以有fromuser touser,可以没有fromuser,也可以没有touser,如果都没有,使用userid用户当做操作用户

 

例如:

用户级:

 

表级:

imp system/oracle fromuser=hr touser=sh file=g.dmp tables=lsy ignore=y

imp system/oracle touser=sh file=g.dmp tables=lsy ignore=y

imp sh/sh file=g.dmp tables=lsy ignore=y

这三句话是等同的,意思都是把LSY表导入到SH用户里。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/20928639/viewspace-748854/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: tnsping简介
下一篇: 常用数据字典
请登录后发表评论 登录
全部评论

注册时间:2012-11-09

  • 博文量
    31
  • 访问量
    69197