在11.2的ASM实例上,执行show parameter spfile:
[grid@flower ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on Mon Dec 7 15:56:12 2009
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string+DATA/asm/asmparameterfile/reg
istry.253.704991445
可以看到spfile在ASM磁盘组里了。但是,和之前的版本不同,在$ORACLE_HOME/dbs目录下却没有pfile来定位 spfile。
[grid@flower ~]$ ls $ORACLE_HOME/dbs
ab_+ASM.dat hc_+ASM.dat init.ora orapw+ASM peshm_+ASM_1
那么ASM实例如何得知它的spfile具体位置的呢?
答案是通过一个“本地注册表”。
Oracle的Grid Infastructure使用这样一个“本地注册表”来记录本地的所有可控资源。
“本地注册表”位置在/etc/oracle/olr.loc文件中,查看olrconfig_loc变量:
[grid@flower ~]$ cat /etc/oracle/olr.loc
olrconfig_loc=/u01/app/grid/product/11.2.0/grid/cdata/localhost/flower.olr
crs_home=/u01/app/grid/product/11.2.0/grid
查看“本地注册表”的内容:
[grid@flower ~]$ ocrdump -local -xml
[grid@flower ~]$ grep -i spfile OCRDUMPFILE
<NAME>SYSTEM.OHASD.TYPES.ora!asm!type.SPFILE</NAME>
<NAME>SYSTEM.OHASD.TYPES.ora!asm!type.SPFILE.CONFIG</NAME>
<VALUE>
<![CDATA[ACL=owner:grid:rwx,pgrpinstall:rwx,other::r--
~ACTION_FAILURE_TEMPLATE=~ACTION_SCRIPT=
~AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%
~ALIAS_NAME=~ASM_DISKSTRING=~AUTO_START=restore~BASE_TYPE=ora.local_resource.type
~CHECK_INTERVAL=1~CHECK_TIMEOUT=600
~DEFAULT_TEMPLATE=PROPERTY(RESOURCE_CLASS=asm) ELEMENT(INSTANCE_NAME= %GEN_USR_ORA_INST_NAME%)
~DEGREE=1~DESCRIPTION=Oracle ASM resource~ENABLED=1~GEN_USR_ORA_INST_NAME=+ASM~LOAD=1~LOGGING_LEVEL=1
~NAME=ora.asm~NLS_LANG=~NOT_RESTARTING_TEMPLATE=~OFFLINE_CHECK_INTERVAL=0~PROFILE_CHANGE_TEMPLATE=
~RESTART_ATTEMPTS=5~SCRIPT_TIMEOUT=60
~SPFILE=+DATA/asm/asmparameterfile/registry.253.704991445~START_DEPENDENCIES=hard(ora.cssd) weak(ora.LISTENER.lsnr)
~START_TIMEOUT=900~STATE_CHANGE_TEMPLATE=
~STOP_DEPENDENCIES=hard(ora.cssd)~STOP_TIMEOUT=600~TYPE=ora.asm.type
~TYPE_ACL=owner:grid:rwx,pgrpinstall:rwx,other::r--
~UPTIME_THRESHOLD=1d~USR_ORA_ENV=~USR_ORA_INST_NAME=+ASM~USR_ORA_OPEN_MODE=mount
~USR_ORA_OPI=false~USR_ORA_STOP_MODE=immediate~VERSION=11.2.0.1.0~]]>
</VALUE> |
|