[小e笔记]之错误案例——ORA-01034和ORA-27101错误

操作系统环境redhat5.3    Oracle版本:Oracle11gR2 

错误描述如下:

SQL> startup

ORACLE instance started.

Total System Global Area  598437888 bytes

Fixed Size                  1338140 bytes

Variable Size             394265828 bytes

Database Buffers          197132288 bytes

Redo Buffers                5701632 bytes

Database mounted.

Database opened.

SQL> select * from test;

        ID        SCN

---------- ----------

         1     751174

         2     751225

         3     751232

         4     751239

         5     751794

         6     751805

         7     751811

         8     752922

8 rows selected.

SQL> conn scott/tiger

ERROR:

ORA-01034: ORACLE not available

ORA-27101: shared memory realm does not exist

Linux Error: 2: No such file or directory

Process ID: 0

Session ID: 0 Serial number: 0

Warning: You are no longer connected to ORACLE.

找了N多网上资料:

(1)   当ORACLE_HOME、ORACLE_SID设置不正确时,会出现这个错误

[oracle@elvis ~]$ echo $ORACLE_HOME

/u01/oracle/product/11.2.0/dbhome_1

[oracle@elvis ~]$ echo $ORACLE_SID

Elvis

经过查看不是因为这个错误。

(2)      说是由于listener.ora里面的语句设置不正确导致的

[oracle@elvis admin]$ cat listener.ora

# listener.ora Network Configuration File: /u01/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = elvis)

      (ORACLE_HOME = /u01/oracle/product/11.2.0/dbhome_1)  --后面不应该有”/”

      (SID_NAME = elvis)                                                   我的也没问题

    )

  )

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = elvis)(PORT = 1521))

    )

  )

ADR_BASE_LISTENER = /u01/oracle

(3)      还有说Oracle目录满了导致的

(4)      由于监听服务文件的错误

 [oracle@elvis admin]$ vi tnsnames.ora

# tnsnames.ora Network Configuration File: /u01/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

ABC =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = elvis)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = elvis)

    )

  )

LISTENER_ELVIS =

(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

我加了这句话后,正常了

[oracle@elvis ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 17 14:15:39 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> conn scott/tiger

Connected.

 

elvis

2012.10.17

知识共享~共同进步

转载请注明:

http://blog.csdn.net/elvis_dataguru/article/details/8081414

 

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值