zoukankan      html  css  js  c++  java
  • Linux 下 oracle 导入数据库—数据泵方式导入dmp文件

    dmp导出数据源的oracle版本是12c,我本地oracle版本是11g,这在导入数据过程中导致出现错误

    一、用system 用户登录oracle,我忘记了system密码,解决办法:

    [oracle@yypc ~]$sqlplus "/as sysdba"

    SQL>startup

    SQL>conn /as sysdba

    SQL>alter user system identified by password;

    SQL>alter user system account unlock;

    SQL>conn system/password

    SQL> Create directory TEST as '/home/oracle/Desktop/test';

    SQL>  Grant read,write on directory TEST to scott;    

    SQL> SELECT * FROM  dba_DIRECTORIES;

    问题: 1、日志和dmp文件不能有路径,dmp文件放到directory所创建的路径下( '/home/oracle/Desktop/test'),log文件oracle会自动保存在$ORACLE_HOME目录下

    [oracle@yypc ~]$ impdp scott/youyou full=y directory=TEST dumpfile=/home/oracle/Desktop/ExpIirspublish20141117.dmp logfile=/home/oracle/Desktop/imp_icdmain_csd_X.log ignore=y

    Import: Release 11.2.0.1.0 - Production on Mon Jan 5 10:24:27 2015

    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options

    ORA-39002: invalid operation

    ORA-39070: Unable to open the log file.

    ORA-39088: file name cannot contain a path specification

    [oracle@youyoupc ~]$ impdp scott/youyou full=y directory=TEST dumpfile=/home/oracle/Desktop/ExpIirspublish20141117.dmp logfile=imp_icdmain_csd_X.log ignore=y Import: Release 11.2.0.1.0 - Production on Mon Jan 5 10:24:50 2015

    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options

    ORA-39001: invalid argument value

    ORA-39000: bad dump file specification

    ORA-39088: file name cannot contain a path specification

    问题2:版本所引发的问题,解决高版本向低版本

    [oracle@youyoupc ~]$ impdp scott/youyou full=y directory=TEST dumpfile=ExpIirspublish20141117.dmp logfile=imp_icdmain_csd_X.log ignore=y

    Import: Release 11.2.0.1.0 - Production on Mon Jan 5 10:26:09 2015

    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options

    ORA-39001: invalid argument value

    ORA-39000: bad dump file specification

    ORA-39142: incompatible version number 4.1 in dump file "/home/oracle/Desktop/test/ExpIirspublish20141117.dmp"

    源端数据库版本12c,目标端数据库版本11g,源端数据库版本高于目标端数据库版本,源端导出数据时加上目标端version,

    查询版本SQL> show parameter compatible;

  • 相关阅读:
    黑马程序员:3分钟带你读懂C/C++学习路线
    大学毕业的你,满腔洪荒之力却找不到出口?
    从零基础到精通的前端学习路线
    Python学习笔记(2)——Python的函数、模块、包和库
    Python学习笔记(1)——Python的概述(Python的环境、变量、数据类型、基本运算)
    MATLAB优化——减少for的使用
    初识Python(windows)——下载、安装、使用
    高维数据稀疏表示-什么是字典学习(过完备词典)
    用1天快速上手org-mode(windows系统)
    零基础数据挖掘学习清单
  • 原文地址:https://www.cnblogs.com/xuxin-1989/p/4203150.html
Copyright © 2011-2022 走看看