zoukankan      html  css  js  c++  java
  • oracle-11G转10G

    先查询directory的地址 导出的文件必须放在此目录
    select * from dba_directories;
    找到directory_name的值 ,也可以新建一个
    create directory test as 'f: est'


    11g 导出语句:EXPDP USERID='facial/facial@orcl' schemas=facial directory=test dumpfile=aa.dmp logfile=aa.log version=10.2.0.1.0
    10g 导入语句:IMPDP USERID='facial/facial@orcl' schemas=facial directory=test dumpfile=aa.dmp logfile=aa.log version=10.2.0.1.0

    EXPDP USERID='facial/facial@orcl' schemas=facial directory=TEST dumpfile=20150306.dmp logfile=20150306.log version=10.2.0.1.0 EXCLUDE=TABLE:"IN('XT_LOG','PM_FILE')"
    IMPDP USERID='facial/facial@orcl' REMAP_SCHEMA=zyws:zyws REMAP_TABLESPACE=users:users directory=TEST dumpfile=20150409.DMP logfile=20150409.log

    IMPDP USERID='facial/facial@orcl' REMAP_SCHEMA=QD:QD REMAP_TABLESPACE=INSIDE:INSIDE directory=TEST dumpfile=20150409.DMP logfile=20150410.log exclude=TRIGGER


    一、数据导出(exp.exe)
    1、将数据库orcl完全导出,用户名system,密码accp,导出到d:daochu.dmp文件中
    exp system/accp@orcl file=d:daochu.dmp full=y

    2、将数据库orcl中scott用户的对象导出
    exp scott/accp@orcl file=d:daochu.dmp owner=(scott)

    3、将数据库orcl中的scott用户的表emp、dept导出
    exp scott/accp@orcl file= d:daochu.dmp tables=(emp,dept)

    4、将数据库orcl中的表空间testSpace导出
    exp system/accp@orcl file=d:daochu.dmp tablespaces=(testSpace)

    二、数据导入(imp.exe)
    1、将d:daochu.dmp 中的数据导入 orcl数据库中。
    imp system/accp@orcl file=d:daochu.dmp full=y

    2、如果导入时,数据表已经存在,将报错,对该表不会进行导入;加上ignore=y即可,表示忽略现有表,在现有表上追加记录。
    imp scott/accp@orcl file=d:daochu.dmp full=y ignore=y

    3、将d:daochu.dmp中的表emp导入
    imp scott/accp@orcl file=d:daochu.dmp tables=(emp)

    三、注意
    1、导入语句中加入transform=segment_attributes:n参数。该参数可与忽略expdp导出时附带的相关表空间和存储子句约束。
    2、IGNORE=Y oracle导入数据库时忽略错误继续执行下去

    3、将d:daochu.dmp中的表emp导入
    imp scott/accp@orcl file=d:daochu.dmp tables=(emp)

  • 相关阅读:
    HTML编码规范(转)
    ASP.NET连接MySQL数据库方法(测试可行)
    Redis源码解析05: 压缩列表
    Redis源码解析04: 跳跃表
    Redis源码解析03: 字典的遍历
    Redis源码解析02: 字典
    Redis源码解析01: 简单动态字符串SDS
    小象垃圾分类小程序从开始到结束
    spring boot踩坑记
    spring boot打包问题
  • 原文地址:https://www.cnblogs.com/xiufengd/p/14443161.html
Copyright © 2011-2022 走看看