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)

  • 相关阅读:
    mongodb
    python中读取文件的read、readline、readlines方法区别
    uva 129 Krypton Factor
    hdu 4734
    hdu 5182 PM2.5
    hdu 5179 beautiful number
    hdu 5178 pairs
    hdu 5176 The Experience of Love
    hdu 5175 Misaki's Kiss again
    hdu 5174 Ferries Wheel
  • 原文地址:https://www.cnblogs.com/xiufengd/p/14443161.html
Copyright © 2011-2022 走看看