环境:单节点的Standalone server
asm创建spfile
[grid@localhost dbs]$ echo $ORACLE_SID
+ASM
SQL> create spfile from pfile='/tmp/init+ASM.ora';
create spfile from pfile='/tmp/init+ASM.ora'
*
ERROR at line 1:
ORA-29786: SIHA attribute GET failed with error [Attribute 'SPFILE' sts[200]
lsts[0]]
解决办法:
[grid@localhost dbs]$ srvctl add asm -l LISTENER -p /tmp/init+ASM.ora -d '/dev/asm*';
再次执行:
SQL> create spfile from pfile='/tmp/init+ASM.ora';
File created.
检查asm资源情况
[root@localhost bin]# ./crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE localhost
ora.asm ora.asm.type 0/5 0/ OFFLINE OFFLINE
ora.cssd ora.cssd.type 0/5 0/5 ONLINE ONLINE localhost
ora.diskmon ora....on.type 0/10 0/5 OFFLINE OFFLINE
ora.evmd ora.evm.type 0/10 0/5 ONLINE ONLINE localhost
ora.ons ora.ons.type 0/3 0/ OFFLINE OFFLINE
发现asm资源没有启动,尝试启动
[grid@localhost ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Thu Nov 5 02:11:17 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> connect / as sysasm
Connected to an idle instance.
SQL> startup
ASM instance started
Total System Global Area 1135747072 bytes
Fixed Size 2260728 bytes
Variable Size 1108320520 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
再次检查grid资源,查看asm资源以及启动,同时DATA磁盘组也启动了
[root@localhost bin]# ./crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE localhost
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE localhost
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE localhost
ora.cssd ora.cssd.type 0/5 0/5 ONLINE ONLINE localhost
ora.diskmon ora....on.type 0/10 0/5 OFFLINE OFFLINE
ora.evmd ora.evm.type 0/10 0/5 ONLINE ONLINE localhost
ora.ons ora.ons.type 0/3 0/ OFFLINE OFFLINE