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

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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/393784/viewspace-1090324/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值