• 安装oracle出现的一些问题


    今天在虚拟机上安装ORACLE 出现了一系列的问题,现将这些记录下来

     

     

    最开始用sqlplus登陆后,startup 开启数据提示ORA-01078错误

     

    SQL> startup;

    ORA-01078: failure in processing system parameters

    LRM-00109: could not open parameter file '/opt/oracle/product/10g/dbs/initorc1.ora'

     

    ORACLE在启动的时候会首先去找spfile文件,如果没有则会去找pfile,但是2个文件都没有,所有报错

    [oracle@node1 ~]$ ll /opt/oracle/product/10g/dbs/initorc1.ora

    ls: /opt/oracle/product/10g/dbs/initorc1.ora: No such file or directory

     

    使用默认的init.ora文件生成新的pfile文件

    [oracle@node1 dbs]$ cp init.ora initorc1.ora

     

    再尝试启动数据库,发现还是失败,提示shared pool memory太小了

    SQL> startup;

    ORA-00371: not enough shared pool memory, should be atleast 62198988 bytes

     

    因为startup的时候是从pfile里读取shared pool memory值,所以手动修改为大于62198988的值

    [oracle@node1 dbs]$ vim initorc1.ora

    shared_pool_size = 70000000     

     

    再尝试,发现报新的错误 ORA-00205

    SQL> startup;

    ORACLE instance started.

     

    Total System Global Area  104857600 bytes

    Fixed Size                  1217932 bytes

    Variable Size              96471668 bytes

    Database Buffers            4194304 bytes

    Redo Buffers                2973696 bytes

    ORA-00205: error in identifying control file, check alert log for more info

     

    因为最初控制文件是用的默认的,所有存在一些问题,把数据库sstartupnomount状态,重建一个新的控制文件

    SQL> startup nomount

    ORACLE instance started.

     

    Total System Global Area  104857600 bytes

    Fixed Size                  1217932 bytes

    Variable Size              96471668 bytes

    Database Buffers            4194304 bytes

    Redo Buffers                2973696 bytes

    SQL> create controlfile reuse database 'orcl' noresetlogs noarchivelog

      2  maxlogfiles 16

      3  maxlogmembers 3

      4  maxdatafiles 100

      5  maxinstances 8

      6  maxloghistory 292

      7  logfile

      8  group 1 '/opt/oracle/oradata/orcl/redo01.log' size 50M,

      9  group 2 '/opt/oracle/oradata/orcl/redo02.log' size 50M,

     10  group 3 '/opt/oracle/oradata/orcl/redo03.log' size 50M

     11  datafile

     12   '/opt/oracle/oradata/orcl/system01.dbf',

     13   '/opt/oracle/oradata/orcl/undotbs01.dbf',

     14   '/opt/oracle/oradata/orcl/sysaux01.dbf',

     15   '/opt/oracle/oradata/orcl/users01.dbf',

     16   '/opt/oracle/oradata/orcl/example01.dbf'

     17  character set we8iso8859p1

     18  ;

     

    Control file created.

    SQL> alter database open;

     

    Database altered.

     

     

    问题:

     

    如果有以下错误提示则需要在pfile加入compatible = 10.2.0.1.0

    ERROR at line 1:

    ORA-01503: CREATE CONTROLFILE failed

    ORA-01130: database file version 10.2.0.1.0 incompatible with ORACLE version

    10.2.0.0.0

    ORA-01110: data file 1: '/opt/oracle/oradata/orcl/system01.dbf'

     

     

    如果有一下提示重新恢复下数据文件

    SQL> alter database open;

    alter database open

    *

    ERROR at line 1:

    ORA-01113: file 5 needs media recovery

    ORA-01110: data file 5: '/opt/oracle/oradata/orcl/example01.dbf'

     

     

    SQL> recover datafile '/opt/oracle/oradata/orcl/example01.dbf'

    Media recovery complete.

    转载 http://blog.chinaunix.net/uid-1861701-id-86892.html

  • 相关阅读:
    C/C++ 读文件
    算法和数据结构 图表示
    protobuf
    C/C++ jsoncpp
    C/C++ C++11作用域枚举
    腾讯云云函数快速入门实践
    Serverless 与 Flask 框架结合进行 Blog 开发
    从企业微信机器人到小爱同学,用 Serverless 实现生活智能化!
    基于 Serverless 与 Websocket 的聊天工具实现
    云函数 SCF 与对象存储实现 WordCount 算法
  • 原文地址:https://www.cnblogs.com/future2012lg/p/3095902.html
Copyright © 2020-2023  润新知