|
遇到了同样的问题, 已解决! 分享下~
我的 ORACLE_HOME 之前的配置是 ORACLE_HOME=/u01/app/grid/product/11.2.0/grid/
修改成 ORACLE_HOME=/u01/app/grid/product/11.2.0/grid --去掉了 grid 目录后斜杠
去掉后就正常了.... 好奇怪, 绝对目录后有无 / 还有区别吗??
[grid@Helen grid]$ echo $ORACLE_HOME
/u01/app/grid/product/11.2.0/grid/
[grid@Helen grid]$
[grid@Helen grid]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on Wed Sep 23 22:32:32 2020
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-15149: another ASM instance found running on the host
SQL>
SQL> exit
Disconnected
[grid@Helen grid]$
[grid@Helen grid]$ export ORACLE_HOME=/u01/app/grid/product/11.2.0/grid
[grid@Helen grid]$
[grid@Helen grid]$ echo $ORACLE_HOME
/u01/app/grid/product/11.2.0/grid
[grid@Helen grid]$
[grid@Helen grid]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on Wed Sep 23 22:33:27 2020
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Automatic Storage Management option
SQL> select instance_name, status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
+ASM STARTED
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Automatic Storage Management option
[grid@Helen grid]$
[grid@Helen grid]$ vi ~/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export ORACLE_SID=+ASM
export ORACLE_BASE=/u01/app/grid
# export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid/
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid
export PATH=$ORACLE_HOME/bin:$PATH
export PATH
[grid@Helen grid]$ source ~/.bash_profile
[grid@Helen grid]$ |
|