今天安装oracle11g R2的grid,装完之后发现无法加载diskgroups,报错如下:
SQL> startup
ORA-00099: warning: no parameter file specified for ASM instance
ASM instance started
Total System Global Area 283930624 bytes
Fixed Size 2225792 bytes
Variable Size 256539008 bytes
ASM Cache 25165824 bytes
ORA-15110: no diskgroups mounted
(1)分析认为是由于ORA-00099引起,无法找到diskgroup。
(2)在网上搜索得到asm参数文件的配置格式如下:
asm_diskstring='/dev/oracleasm/disks/DISK*'
asm_diskgroups='DATA'
asm_power_limit=1
diagnostic_dest='/opt/oracle'
instance_type='asm'
large_pool_size=12M
remote_login_passwordfile='EXCLUSIVE'
生成文件:$ORACLE_HOME/grid/dbs/init+ASM.ora
注意asm_diskstring中必须包含“*”才能正确加载,否则报下面错误
SQL> startup
ASM instance started
Total System Global Area 283930624 bytes
Fixed Size 2225792 bytes
Variable Size 256539008 bytes
ASM Cache 25165824 bytes
ORA-15032: not all alterations performed
ORA-15017: diskgroup "DATA" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DATA"
(3)保存设置到spfile
SQL> create spfile from pfile;
create spfile from pfile
*
ERROR at line 1:
ORA-29786: SIHA attribute GET failed with error [Attribute 'SPFILE' sts[200]
lsts[0]]
产生这个问题的原因为ORACLE认为ASM实例是手工创建的,并没有注册这个资源,那么首先增加ASM资源
需要使用下面命令注册asm
srvctl add asm -l LISTENER -d '/dev/oracleasm/disks/DISK*'
然后重新执行命令:
SQL> create spfile from pfile;
File created.
(4)关闭asm实例后重新启动,成功加载:
SQL> startup
ASM instance started
Total System Global Area 283930624 bytes
Fixed Size 2225792 bytes
Variable Size 256539008 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
ASM diskgroups volume enabled