ORA-12545: Connect failed because target host or object does not exist

[oracle@ybdbtest oradata]$ sqlplus /nolog


SQL*Plus: Release 9.2.0.4.0 - Production on Thu Jun 26 10:16:29 2014


Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


SQL> conn / as sysdba

ERROR:
ORA-12545: Connect failed because target host or object does not exist

记得昨天都连上去了,怎么回事。查看oracle进程。进程存在。说明数据库是执行的。

[oracle@ybdbtest ~]$ ps -ef | grep ora_
oracle    5013  4499  0 11:33 pts/1    00:00:00 grep ora_
oracle   11806     1  0  2013 ?

       00:00:00 ora_q001_szyb
oracle   12212     1  0  2013 ?        00:08:51 ora_pmon_szyb
oracle   12214     1  0  2013 ?

       00:00:02 ora_psp0_szyb
oracle   12216     1  0  2013 ?

       00:00:00 ora_mman_szyb
oracle   12218     1  0  2013 ?

       00:03:25 ora_dbw0_szyb
oracle   12220     1  0  2013 ?        00:03:35 ora_dbw1_szyb
oracle   12222     1  0  2013 ?        00:03:36 ora_dbw2_szyb
oracle   12224     1  0  2013 ?

       00:05:56 ora_lgwr_szyb
oracle   12226     1  0  2013 ?

       02:13:23 ora_ckpt_szyb
oracle   12228     1  0  2013 ?

       00:19:35 ora_smon_szyb
oracle   12230     1  0  2013 ?        00:00:00 ora_reco_szyb
oracle   12232     1  0  2013 ?        00:06:43 ora_cjq0_szyb
oracle   12234     1  0  2013 ?

       00:40:47 ora_mmon_szyb
oracle   12236     1  0  2013 ?        01:23:21 ora_mmnl_szyb
oracle   12238     1  0  2013 ?        00:00:00 ora_d000_szyb
oracle   12240     1  0  2013 ?

       00:00:00 ora_s000_szyb
oracle   12280     1  0  2013 ?

       00:00:00 ora_qmnc_szyb
oracle   12300     1  0  2013 ?

       00:00:00 ora_q000_szyb


通过SQL*Plus: Release 9.2.0.4.0 - Production on Thu Jun 26 10:16:29 2014。能够看出数据库版本号是9i,记忆中昨天的版本号是10g,

检查发现,9i与10g的版本号都有安装,检查.bash_profile文件。发现$ORACLE_HOME指向的是9i,改动$ORACLE_HOME,使其指向

10g(主要是bin文件夹下的可运行程序),再次连接,成功:

[oracle@ybdbtest ~]$ sqlplus / as sysdba


SQL*Plus: Release 10.2.0.5.0 - Production on Thu Jun 26 11:01:17 2014


Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.




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


当安装了多个版本号oracle,确实要注意。




版权声明:本文博主原创文章,博客,未经同意不得转载。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值