zoukankan      html  css  js  c++  java
  • Oracle11g导入*.dmp数据文件

    imp命令导入数据:
    imp username/password@SID file=XXX.dmp fromuser=XXX touser=XXX tables=(XXX,XXX)  [ignore=y]
    其中,
    1.SID为数据库名;
    2.fromuser指对方数据库用户名;(创建xxx.dmp数据库文件的用户);fromuser若为多个表空间的话,使用()将其括起来:fromuser=(a,b);
    3.touser指你的数据库的用户名;(将xxx.dmp数据库文件导入的用户);touser参数仿fromuser参数;
    4.若只导入一部分表,使用tables参数,用()括起要导入的表;如果想全部导入,不需要指定tables参数;
    5.ignore=y :上面可能有点问题,因为有的表已经存在,然后它就报错,对该表就不进行导入,在后面加上 ignore=y 就可以导入。
     
    在导入过程中可能遇到错误:
    376错误:
    ORA-00376: file string cannot be read at this time
    文件字符串本次操作不可读
    Cause: attempting to read from a file that is not readable. Most likely the file is offline.
    (1)原因:表空间是离线
    解决方法:检查表空间状态,将其online:
    SQL>alter tablespace 表空间名 online;

    (2)原因:表空间对应的文件不存在
    解决方法:在提示错误的表空间对应的文件下,建立对应的表空间(对应的表空间大小根据自己导入的文件的大小进行确定
    SQL>create tablespace ceimsexchange

    2 datafile 'F:asmfileasm_file.dbf'
      3 size 100M AutoExtend On Next 10M Maxsize 2048M
      4 extent management local
      5 segment space management auto;
    注意F:asmfile这个路径必须先建好
  • 相关阅读:
    2009中国IT界名人
    jQuery简介
    Spring下载地址
    ContextLoaderListener
    MyBatisUtil类
    SSM事务
    后台管理中心跳转问题解决
    mybatis返回boolean值时数据库返回null
    yarn作业提交过程
    Hadoop集群运行wordcount jar包出错
  • 原文地址:https://www.cnblogs.com/striver-zhu/p/4121411.html
Copyright © 2011-2022 走看看