Chinaunix首页 | 论坛 | 博客
  • 博客访问: 338077
  • 博文数量: 94
  • 博客积分: 1500
  • 博客等级: 上尉
  • 技术积分: 1020
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-11 09:23
文章分类
文章存档

2011年(76)

2010年(18)

分类: Oracle

2011-10-24 14:39:57

一、场景:
 
早上在已装了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>

阅读(2173) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~