【ORA】ORA-00371: not enough shared pool memory
阅读原文时间:2023年07月11日阅读:1

今天rac中有一个节点asm实例起不来包了ora-000371的错误,错误贴在下面:

[oracle@rac2 dbs]$ srvctl start asm -n rac2
PRKS-1009 : Failed to start ASM instance "+ASM2" on node "rac2", [PRKS-1009 : Failed to start ASM instance "+ASM2" on node "rac2", [rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:SQL*Plus: Release 10.2.0.5.0 - Production on Wed Jun 27 07:58:41 2018
rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.
rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:Enter user-name: Connected to an idle instance.
rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:SQL> ORA-00371: not enough shared pool memory, should be atleast 128265318 bytes
rac2:ora.rac2.ASM2.asm:SQL> Disconnected
rac2:ora.rac2.ASM2.asm:
CRS-0215: Could not start resource 'ora.rac2.ASM2.asm'.]]
  [PRKS-1009 : Failed to start ASM instance "+ASM2" on node "rac2", [rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:SQL*Plus: Release 10.2.0.5.0 - Production on Wed Jun 27 07:58:41 2018
rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.
rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:Enter user-name: Connected to an idle instance.
rac2:ora.rac2.ASM2.asm:
rac2:ora.rac2.ASM2.asm:SQL> ORA-00371: not enough shared pool memory, should be atleast 128265318 bytes
rac2:ora.rac2.ASM2.asm:SQL> Disconnected
rac2:ora.rac2.ASM2.asm:
CRS-0215: Could not start resource 'ora.rac2.ASM2.asm'.]]

遇到了这个问题,首先的思路是先看看能不能通过pfile启动这个实例,毕竟asm的相关配置是没有动过的。

#cd $ORACLE_HONE/dbs

找到相关的pfile文件

init+ASM2.ora -> /u01/app/oracle/admin/+ASM/pfile/init.ora

查看下这个文件和+ASM1的对比一下,发现这个文件被人好像修改过,先不管这些,先把这个备份,从实例1上copy过来一个看能起来不

 #cp /u01/app/oracle/admin/+ASM/pfile/init.ora /u01/app/oracle/admin/+ASM/pfile/init.ora.bak

到节点1上,scp过来一个

scp  /u01/app/oracle/admin/+ASM/pfile/init.ora rac2:/u01/app/oracle/admin/+ASM/pfile/init.ora 

init.ora                                                      100% 1084     1.1KB/s   00:00 

完成后,再次重启

$ srvctl start asm -n rac2

启动成功,没有报错,查看下crs状态

[oracle@rac2 dbs]$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.rac.db     application    ONLINE    ONLINE    rac1
ora....c1.inst application    ONLINE    ONLINE    rac1
ora....c2.inst application    ONLINE    OFFLINE
ora....SM1.asm application    ONLINE    ONLINE    rac1
ora....C1.lsnr application    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    ONLINE    ONLINE    rac1
ora.rac1.ons   application    ONLINE    ONLINE    rac1
ora.rac1.vip   application    ONLINE    ONLINE    rac1
ora....SM2.asm application    ONLINE    ONLINE    rac2
ora....C2.lsnr application    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    ONLINE    ONLINE    rac2
ora.rac2.ons   application    ONLINE    ONLINE    rac2
ora.rac2.vip   application    ONLINE    ONLINE    rac2  

srvctl start instance -d rac -i rac2

启动完成

[oracle@rac1 dbs]$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.rac.db     application    ONLINE    ONLINE    rac1
ora....c1.inst application    ONLINE    ONLINE    rac1
ora....c2.inst application    ONLINE    ONLINE    rac2
ora....SM1.asm application    ONLINE    ONLINE    rac1
ora....C1.lsnr application    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    ONLINE    ONLINE    rac1
ora.rac1.ons   application    ONLINE    ONLINE    rac1
ora.rac1.vip   application    ONLINE    ONLINE    rac1
ora....SM2.asm application    ONLINE    ONLINE    rac2
ora....C2.lsnr application    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    ONLINE    ONLINE    rac2
ora.rac2.ons   application    ONLINE    ONLINE    rac2
ora.rac2.vip   application    ONLINE    ONLINE    rac

这回问题得到解决

总结:

平时操作的时候,尽量所有的东西都有备份,遇到问题不要慌,遇到问题先分析,找到入口后操作,所有问题都有备份跟着,做数据库也就是这样,有备份,就一切都好说