在同一台机器上装了双实例,出现的问题

765阅读 0评论2011-10-25 linux_kaige
分类:

一、场景:
 
早上在已装了10.2.0.1.0的数据库上,再装了个11.2.0.1.0的数据库.
10g默认的监听端口是1521,11g的默认监听端口是1522
oracle用户下的.bash_profile环境变量的设置我配成11g的。在shell环境下设置10g的$ORACLE_SID和$ORACLE_HOME,并且试图通过sqlplus / as  sysdba 连接10g的数据库,出现下面的问题:
 
二、问题:
[oracle@localhost ~]$ cp bash_profile_11g .bash_profile
[oracle@localhost ~]$ su - oracle
口令:
[oracle@localhost ~]$  export ORACLE_BASE=/home/oracle/oracle;
[oracle@localhost ~]$  export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1;
[oracle@localhost ~]$ export ORACLE_SID=steel;
[oracle@localhost ~]$ sqlplus / as sysdba
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly
 
SP2-1503:无法初始化oracle调用界面
SP2-1502: oracle 不能正常工作
 
三、解决办法:
 
1. 启动10g:
[oracle@localhost ~]$ cp bash_profile_10g .bash_profile
[oracle@localhost ~]$ su - oracle
口令:
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 24 15:07:04 2011
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>
 
2.启动11g:
SP2-0152: ORACLE may not be functioning properly
[oracle@localhost ~]$ cp bash_profile_11g .bash_profile
[oracle@localhost ~]$ su - oracle
口令:
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Oct 24 15:08:44 2011
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>

上一篇:OpenBSD系统的文件布局[转]
下一篇:配置apache+tomcat集群,tomcat 启动出错问题一