【问题现象】
[grid@localhost ~]$ echo $ORACLE_SID +asm [grid@localhost ~]$ echo $ORACLE_HOME /u01/app/11.2.0/grid [grid@localhost ~]$ sqlplus / as sysasm SQL*Plus: Release 11.2.0.1.0 Production on Fri Oct 18 22:35:03 2013 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>
【问题分析】
已存在一个运行的 ASM 实例,为什么还会提示连接到空闲实例?
查看进程:
[grid@localhost ~]$ ps -ef | grep asm_ | grep -v grep grid 2009 1 0 21:44 ? 00:00:00 asm_pmon_+ASM grid 2011 1 0 21:44 ? 00:00:07 asm_vktm_+ASM grid 2015 1 0 21:44 ? 00:00:00 asm_gen0_+ASM grid 2017 1 0 21:44 ? 00:00:00 asm_diag_+ASM grid 2019 1 0 21:44 ? 00:00:00 asm_psp0_+ASM grid 2021 1 0 21:44 ? 00:00:00 asm_dia0_+ASM grid 2023 1 0 21:44 ? 00:00:00 asm_mman_+ASM grid 2025 1 0 21:44 ? 00:00:00 asm_dbw0_+ASM grid 2027 1 0 21:44 ? 00:00:00 asm_lgwr_+ASM grid 2029 1 0 21:44 ? 00:00:00 asm_ckpt_+ASM grid 2031 1 0 21:44 ? 00:00:00 asm_smon_+ASM grid 2033 1 0 21:44 ? 00:00:00 asm_rbal_+ASM grid 2035 1 0 21:44 ? 00:00:00 asm_gmon_+ASM grid 2037 1 0 21:44 ? 00:00:00 asm_mmon_+ASM grid 2039 1 0 21:44 ? 00:00:00 asm_mmnl_+ASM grid 2069 1 0 21:45 ? 00:00:00 asm_asmb_+ASM [grid@localhost ~]$进程已全部启动,那是为什么呢?
[grid@localhost ~]$ echo $ORACLE_SID +asm [grid@localhost ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Fri Oct 18 23:47:27 2013 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to an idle instance. SQL> exit Disconnected [grid@localhost ~]$ export ORACLE_SID=+ASM [grid@localhost ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Fri Oct 18 23:47:41 2013 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> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Automatic Storage Management option [grid@localhost ~]$找出问题的原因了:ORACLE_SID 写错了,应该是 +ASM 而不是 +asm,大小写敏感。
【问题解决】
编辑 grid 用户的 .bash_profile 文件
[grid@localhost ~]$ vi /home/grid/.bash_profile
export ORACLE_SID=+asm --> 修改为 +ASM