sqlplus无法启动的问题及解决(3) (25天)

时间:2022-05-04
本文章向大家介绍sqlplus无法启动的问题及解决(3) (25天),主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

今天准备测试一下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: