Chinaunix首页 | 论坛 | 博客
  • 博客访问: 396218
  • 博文数量: 88
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 1054
  • 用 户 组: 普通用户
  • 注册时间: 2012-11-07 12:23
文章分类
文章存档

2014年(88)

我的朋友

分类: 数据库开发技术

2014-06-17 14:31:10

今天准备测试一下10g升级到11g的场景,装完10g的,然后再装11g的服务端。sqlplus就报错了。
因为ORACLE_BASE,ORACLE_HOME已经改过来了。但是怎么试都不行。
查了metalink,上面说可能是因为$ORACLE_HOME/oracore/zoneinfo的权限可能有问题,我一条一条比对了下,没发现权限有问题。
metaLink:
SQLPLUS Fails With SP2-1503 SP2-0152 After New 11.2 Installation [ID 974515.1]

不经意间切换用户,发现原来切换用户就能够搞定。
[ora10g@centos ~]$ sqlplus
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly


[ora10g@centos ~]$ su - ora10g
Password: 

[ora10g@centos ~]$ sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Sat Jul 6 07:37:59 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

然后切换回11g
修改 .bash_profile

# User specific environment and startup programs
export ORACLE_BASE=/u01/app/upg11g
#export ORACLE_BASE=/u01/app/ora10g
#export ORACLE_HOME=$ORACLE_BASE/product/10.2/db_1
export ORACLE_HOME=$ORACLE_BASE/product/11.2/db_home1
[ora10g@centos ~]$ source .bash_profile
[ora10g@centos ~]$ sqlplus
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly
[ora10g@centos ~]$ su - ora10g
Password: 
[ora10g@centos ~]$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Sat Jul 6 07:44:59 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: 
阅读(1107) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~