ITPub博客

首页 > 数据库 > Oracle > 误修改ORACLE_HOME导致无法登陆数据库

误修改ORACLE_HOME导致无法登陆数据库

原创 Oracle 作者:jiangkch 时间:2014-02-26 00:36:12 0 删除 编辑
1、现象:
[oracle@secdb1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 25 23:49:20 2014
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area  314572800 bytes
Fixed Size                  1219184 bytes
Variable Size              79693200 bytes
Database Buffers          230686720 bytes
Redo Buffers                2973696 bytes
Database mounted.
Database opened.
SQL> conn system/oracle@PROD
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
Warning: You are no longer connected to ORACLE.
SQL> 
2.解决方法:
怀疑是ORACLE_HOME目录设置不正确导致,查看ORACLE_HOME目录,发现目录中多了一个“/”
[oracle@secdb1 ~]$ echo $ORACLE_HOME
//u01/app/oracle/product/10.2.0/db_1

重新设置一下ORACLE_HOME的目录,启动数据后,连接正常
[oracle@secdb1 ~]$ export  ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
[oracle@secdb1 ~]$ echo $ORACLE_HOME
/u01/app/oracle/product/10.2.0/db_1
[oracle@secdb1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 26 00:27:41 2014
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area  314572800 bytes
Fixed Size                  1219184 bytes
Variable Size              79693200 bytes
Database Buffers          230686720 bytes
Redo Buffers                2973696 bytes
Database mounted.
Database opened.
SQL> conn system/oracle@PROD
Connected.
SQL> 

3、总结
oracle用户中的环境变量非常重要,特别是ORACLE_HOME,如果不小心改动了,会导致数据库无法连接


jiangkck

2014026
----------------------



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/393784/viewspace-1090324/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2014-02-23

  • 博文量
    4
  • 访问量
    67925