linux RAC asm_diskgroup未设置引起数据库实例无法打开

重新启动linux 机器后 发现数据库实例启动不了。

instance 都没有启动

[oracle@rac2 crsd]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.prod.db    application    ONLINE    OFFLINE              
ora....d1.inst application    ONLINE    OFFLINE              
ora....d2.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  

 

rac1 节点:

[oracle@rac1 crs]$ export ORACLE_SID=prod1
[oracle@rac1 crs]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Oct 25 04:01:29 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/prod/spfileprod.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/prod/spfileprod.ora
ORA-15077: could not locate ASM instance serving a required diskgroup
SQL>

初步判断是ASM实例问题,无法访问spfile文件

[oracle@rac1 crs]$ export ORACLE_SID=+ASM1
[oracle@rac1 crs]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Oct 25 04:03:15 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> select name,state from V$asm_diskgroup;

NAME                           STATE
------------------------------ -----------                                   -------磁盘组未挂载
REC                            DISMOUNTED
DATA                           DISMOUNTED

SQL> alter diskgroup rec mount;

Diskgroup altered.

SQL> alter diskgroup data mount;

Diskgroup altered.

SQL>

[oracle@rac1 crs]$ export ORACLE_SID=prod1
[oracle@rac1 crs]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Oct 25 04:05:22 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  285212672 bytes
Fixed Size                  1218968 bytes
Variable Size             100664936 bytes
Database Buffers          176160768 bytes
Redo Buffers                7168000 bytes
Database mounted.
Database opened.
SQL>                       -------实例1打开

[oracle@rac1 crs]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.prod.db    application    ONLINE    ONLINE    rac2       
ora....d1.inst application    ONLINE    ONLINE    rac1       
ora....d2.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  

-------以同样方法打开实例2(略)

 

------为什么磁盘组不能自动正常挂载呢?

查看+ASM的pfile


###########################################
# Cluster Database
###########################################
cluster_database=true

###########################################
# Diagnostics and Statistics
###########################################
background_dump_dest=/u01/app/oracle/admin/+ASM/bdump
core_dump_dest=/u01/app/oracle/admin/+ASM/cdump
user_dump_dest=/u01/app/oracle/admin/+ASM/udump

###########################################
# Miscellaneous
###########################################
instance_type=asm

###########################################
# Pools
###########################################
large_pool_size=12M

###########################################
# Security and Auditing
###########################################
remote_login_passwordfile=exclusive

asm_diskgroups=''
+ASM2.instance_number=2
+ASM1.instance_number=1

asm_diskgroups的解释:

 

 

 

linux RAC asm_diskgroup未设置引起数据库实例无法打开_第1张图片

将参数文件中的 asm_diskgroup 参数改为:asm_diskgroup=rec,data

测试:

SQL> select name,state from V$asm_diskgroup;

NAME                           STATE
------------------------------ -----------
REC                            DISMOUNTED
DATA                           DISMOUNTED

SQL> shutdown immediate;
ORA-15100: invalid or missing diskgroup name


ASM instance shutdown
SQL> startup
ASM instance started

Total System Global Area   92274688 bytes
Fixed Size                  1217884 bytes
Variable Size              65890980 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL> select name,state from V$asm_diskgroup;

NAME                           STATE
------------------------------ -----------
DATA                           MOUNTED
REC                            MOUNTED

SQL>

 

 

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(oracle)