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,确实要注意。
版权声明:本文博主原创文章,博客,未经同意不得转载。