千家信息网

安装grid后启动asm报ORA-15149错误

发表于:2024-11-25 作者:千家信息网编辑
千家信息网最后更新 2024年11月25日,oracle版本为11.2.0.3,系统版本为Centos Linux 6.6 X86_64,安装完成grid软件后,一切正常,没有报错,但是使用sqlplus / as sysasm后提示连接到空闲
千家信息网最后更新 2024年11月25日安装grid后启动asm报ORA-15149错误

oracle版本为11.2.0.3,系统版本为Centos Linux 6.6 X86_64,安装完成grid软件后,一切正常,没有报错,但是使用sqlplus / as sysasm后提示连接到空闲进程

[grid@oracle dbs]$ sqlplus / as sysasm;SQL*Plus: Release 11.2.0.3.0 Production on Mon Apr 25 15:08:06 2016Copyright (c) 1982, 2011, Oracle.  All rights reserved.Connected to an idle instance.SQL> startup mount;ORA-15149: another ASM instance found running on the host

检查css状态

[grid@oracle ~]$ crs_stat -tName           Type           Target    State     Host        ------------------------------------------------------------ora.DATA.dg    ora....up.type ONLINE    ONLINE    oracle      ora....ER.lsnr ora....er.type ONLINE    ONLINE    oracle      ora.asm        ora.asm.type   ONLINE    ONLINE    oracle      ora.cssd       ora.cssd.type  ONLINE    ONLINE    oracle      ora.diskmon    ora....on.type OFFLINE   OFFLINE               ora.evmd       ora.evm.type   ONLINE    ONLINE    oracle      ora.ons        ora.ons.type   OFFLINE   OFFLINE               ora.orcl.db    ora....se.type ONLINE    ONLINE    oracle

发现ora.diskmon为offline状态,查阅资料后发现从11.2.0.3版本开始默认diskmon在非exadata上是禁用状态

11.2.0.3 Grid Infrastructure diskmon Will be Offline by Default in Non-Exadata Environment [ID 1346881.1]

百般折腾看是否有办法启用ora.diskmon,设置auto_start为1也没有效果,检查asm进程

[grid@oracle grid]$ ps -ef|grep asm_grid      25991      1  0 14:56 ?        00:00:00 asm_pmon_+ASMgrid      25993      1  0 14:56 ?        00:00:00 asm_psp0_+ASMgrid      26019      1  2 14:56 ?        00:00:18 asm_vktm_+ASMgrid      26023      1  0 14:56 ?        00:00:00 asm_gen0_+ASMgrid      26025      1  0 14:56 ?        00:00:00 asm_diag_+ASMgrid      26027      1  0 14:56 ?        00:00:00 asm_dia0_+ASMgrid      26029      1  0 14:56 ?        00:00:00 asm_mman_+ASMgrid      26031      1  0 14:56 ?        00:00:00 asm_dbw0_+ASMgrid      26033      1  0 14:56 ?        00:00:00 asm_lgwr_+ASMgrid      26035      1  0 14:56 ?        00:00:00 asm_ckpt_+ASMgrid      26037      1  0 14:56 ?        00:00:00 asm_smon_+ASMgrid      26039      1  0 14:56 ?        00:00:00 asm_rbal_+ASMgrid      26041      1  0 14:56 ?        00:00:00 asm_gmon_+ASMgrid      26043      1  0 14:56 ?        00:00:00 asm_mmon_+ASMgrid      26045      1  0 14:56 ?        00:00:00 asm_mmnl_+ASMgrid      29065  25763  0 15:10 pts/4    00:00:00 grep asm_

检查监听状态

[grid@oracle ~]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 25-APR-2016 14:56:58Copyright (c) 1991, 2011, Oracle.  All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))STATUS of the LISTENER------------------------Alias                     LISTENERVersion                   TNSLSNR for Linux: Version 11.2.0.3.0 - ProductionStart Date                25-APR-2016 14:55:38Uptime                    0 days 0 hr. 1 min. 20 secTrace Level               offSecurity                  ON: Local OS AuthenticationSNMP                      OFFListener Parameter File   /u01/app/grid/network/admin/listener.oraListener Log File         /u01/app/diag/tnslsnr/oracle/listener/alert/log.xmlListening Endpoints Summary...  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle.study)(PORT=1521)))Services Summary...Service "+ASM" has 1 instance(s).  Instance "+ASM", status READY, has 1 handler(s) for this service...Service "orcl" has 1 instance(s).  Instance "orcl", status READY, has 1 handler(s) for this service...Service "orclXDB" has 1 instance(s).  Instance "orcl", status READY, has 1 handler(s) for this service...The command completed successfully

监听状态正常

检查参数文件init+asm.ora也没发现问题

[grid@oracle dbs]$ cat init+asm.ora *.asm_power_limit=1*.instance_type='asm'*.large_pool_size=12M*.remote_login_passwordfile='EXCLUSIVE'*.asm_diskstring='/dev/asm-disk*'

最后检查.bash_profile文件配置

[grid@oracle dbs]$ cat ~/.bash_profile # .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then        . ~/.bashrcfi# User specific environment and startup programsORACLE_BASE=/u01/app; export ORACLE_BASEORACLE_HOME=/u01/app/grid; export ORACLE_HOMEORACLE_SID=+asm; export ORACLE_SID export LD_LIBRARY_PATH=$ORACLE_HOME/libPATH=$PATH:$HOME/bin:$ORACLE_HOME/binexport PATH

ORACLE_SID为小写的+asm,而实际进程中的为大写+ASM,oracle区分大小写,改为大写后再连接后就正常了

[grid@oracle grid]$ export ORACLE_SID=+ASM[grid@oracle grid]$ sqlplus / as sysasm;SQL*Plus: Release 11.2.0.3.0 Production on Mon Apr 25 15:11:28 2016Copyright (c) 1982, 2011, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Automatic Storage Management optionSQL> show parameter diskgroupNAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------asm_diskgroups                       string

连接后OK

0