51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 3144|回复: 2
打印 上一主题 下一主题

[原创] oracle导入导出笔记

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-8-25 17:47:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
1、 导出包括:导出表、导出方案、导出数据库:导出使用exp命了来完成。
a) 导出表:使用命令提示符:
i. 导出自己的表
导出表必须要进入到oracle目录/bin目录 cd d;
Cd oracle\fsak\ff
Exp userid=scott/tiger@myoral tables=(emp,dept) file=d:\e1.dmp;
ii. 导出其他方案的表
需要dba的权限。
Exp userid=system/maager@myoral tables(scott.emp)file=d:\e2.mp
iii. 使用直接导出方式:速度比较快
Exp userid=system/manager@myoral tables(scoot.emp) file=d:\e5.dmp rows=n  driect=y
   
iv. 导出表的结构
Exp userid=scott/tiger@myoral tables(emp)file=d:\e3.dmp rows=n
b) 导出方案:
i. 导出自己的方案
Exp scoot/tiger@myoral owner=scott file=d:\scoot.dmp
ii. 导出其他方案
导出方案:需要exp_full_database权限,system可以导出任何方案
Exp system/manager@myoral owner=(system,scott)file=d:\system.dmp
c) 导出数据库:需要exp_full_database权限
Exp userid=system/manager@myoral full=y inctype=complete file=x.dmp;
Inctype是否增量备份:complete
2、 导入数据库:导入表、导入方案、导入数据库
选项如下:
Userid:咏仪制定执行导入操作的用户名,口令,连接字符串
Tables:用户至此那个执行导入操作的表
Formuser:用于指定源用户
Touser:用于指定目标用户
File:用于指定导入文件名
Full=y用于指定执行导入整个文件
Inctype:用于指定执行导入操作的增量类型
Rows:指定是否要导入表行
Ignore:如果表存在,则只导入数据
a) 导入表:
i. 导入自己的表
Imp userid=scott/tiger@myoral tables=(emp) file=d:\emp.dmp
ii. 导入表到其他用户
Imp userid=system/manager@myoral tables=(emp) file=d:\xx.dmp touser=scott
iii. 导入表结构
Imp userid=scott/tiger@myoral tables=(emp) file=d:\xxx.dmp rows=n
iv. 导入数据
Imp userid=scott/tiger@myoral tables=(emp) file=d:\xxx.dmp ignore=y
b) 导入方案
i. 导入自身的方案
imp userid=scott/tiger file=d:\xxx.dmp;
ii. 导入其他方案
Imp userid =system/manager file=d:\\xxx.dmp fromuser=system touser=scoot
c) 导入整个数据库
Imp userid=system/manager ffull=y file=d:\xx.dmp;
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

  • TA的每日心情
    奋斗
    2024-6-21 15:27
  • 签到天数: 538 天

    连续签到: 1 天

    [LV.9]测试副司令

    2#
    发表于 2010-8-25 18:39:23 | 只看该作者
    看的有点晕。。慢慢研究吧
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    3#
    发表于 2010-8-31 14:22:53 | 只看该作者
    同意楼上的,有点晕,比较低级还是用菜单导入导出……
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /2 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-7-3 18:25 , Processed in 0.071105 second(s), 27 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表