本篇文章给大家分享的是有关11gR2如何修改Grid软件ASM的参数文件位置,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。
1.Standalone环境。
cd /u01/app/11.2.0/grid/bin# ./crsctl stat res -t——————————————————————————–NAME TARGET STATE SERVER STATE_DETAILS ——————————————————————————–Local Resources——————————————————————————–ora.DATA01.dg ONLINE ONLINE ncappweb2 ora.LI开发云主机域名STENER.lsnr ONLINE ONLINE ncappweb2 ora.OCRVDISK.dg ONLINE ONLINE ncappweb2 ora.asm ONLINE ONLINE ncappweb2 Started ora.ons OFFLINE OFFLINE ncappweb2 ——————————————————————————–Cluster Resources——————————————————————————–ora.cssd 1 ONLINE ONLINE ncappweb2 ora.diskmon 1 OFFLINE OFFLINE ora.evmd 1 ONLINE ONLINE ncappweb2 ora.mtorcl.db 1 ONLINE ONLINE ncappweb2 Open 上面是使用默认方式创建好的Standalone单数据库环境,使用ASM作为存储方式,OCRVDISK存储了ASM实例的参数文件。 如果想Standalone单实例数据库环境中不使用ASM作为ASM实例参数文件的存放方式,推荐的做法是先按照默认的要求,创建好ASM磁盘组,ASM实例的参数文件会存放到该ASM磁盘组中,例如上面的OCRVDISK磁盘组。之后再通过下面的方式将ASM实例的参数文件迁移到本地文件系统。
2.使用srvctl modify asm修改SPFILE位置。
# pwd/u01/app/11.2.0/grid/bin# ./srvctl modify asm -hModifies the configuration for ASM.Usage: srvctl modify asm [-l
] [-p
] [-d ]
-l
Listener name
-p
Server parameter file path
-d ASM diskgroup discovery string -h Print usage# ./srvctl config asmASM home: /u01/app/11.2.0/gridASM listener: LISTENERSpfile: +OCRVDISK/asm/asmparameterfile/registry.253.793652513ASM diskgroup discovery string:# su – grid$ cd /u01/app/11.2.0/grid/dbs/$ lsab_+ASM.dat hc_+ASM.dat init.ora orapw+ASM 当前并没有ASM实例的SPFILE参数文件。$ srvctl modify asm -p /u01/app/11.2.0/grid/dbs/spfile+ASM.ora srvctl modify asm的操作必须在grid用户下完成。
3.重启Grid,检验modify效果。
# ./crsctl stop hasCRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘ncappweb2’CRS-2673: Attempting to stop ‘ora.OCRVDISK.dg’ on ‘ncappweb2’CRS-2673: Attempting to stop ‘ora.mtorcl.db’ on ‘ncappweb2’CRS-2673: Attempting to stop ‘ora.LISTENER.lsnr’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.mtorcl.db’ on ‘ncappweb2’ succeededCRS-2673: Attempting to stop ‘ora.DATA01.dg’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.DATA01.dg’ on ‘ncappweb2’ succeededCRS-2677: Stop of ‘ora.LISTENER.lsnr’ on ‘ncappweb2’ succeededCRS-2677: Stop of ‘ora.OCRVDISK.dg’ on ‘ncappweb2’ succeededCRS-2673: Attempting to stop ‘ora.asm’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.asm’ on ‘ncappweb2’ succeededCRS-2673: Attempting to stop ‘ora.cssd’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.cssd’ on ‘ncappweb2’ succeededCRS-2673: Attempting to stop ‘ora.evmd’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.evmd’ on ‘ncap活动:慈云数据爆款香港服务器,CTG+CN2高速带宽、快速稳定、平均延迟10+ms 速度快,免备案,每月仅需19元!! 点击查看pweb2’ succeededCRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘ncappweb2’ has completedCRS-4133: Oracle High Availability Services has been stopped.# ./crsctl start hasCRS-4123: Oracle High Availability Services has been started.# ./crsctl stat res -t——————————————————————————–NAME TARGET STATE SERVER STATE_DETAILS ——————————————————————————–Local Resources——————————————————————————–ora.DATA01.dg ONLINE ONLINE ncappweb2 ora.LISTENER.lsnr ONLINE ONLINE ncappweb2 ora.OCRVDISK.dg ONLINE ONLINE ncappweb2 ora.asm ONLINE ONLINE ncappweb2 Started ora.ons OFFLINE OFFLINE ncappweb2 ——————————————————————————–Cluster Resources——————————————————————————–ora.cssd 1 ONLINE ONLINE ncappweb2 ora.diskmon 1 OFFLINE OFFLINE ora.evmd 1 ONLINE ONLINE ncappweb2 ora.mtorcl.db 1 ONLINE ONLINE ncappweb2 Open # ./srvctl config asmASM home: /u01/app/11.2.0/gridASM listener: LISTENERSpfile: /u01/app/11.2.0/grid/dbs/spfile+ASM.oraASM diskgroup discovery string:# su – grid$ sqlplus / as sysasmSQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 11 09:50:55 2012Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit ProductionWith the Automatic Storage Management optionSQL> show parameter spfileNAME TYPE———————————— ———————-VALUE——————————spfile string 连接到ASM实例,但是并看不到SPFILE参数被指定了值。
4.删除存储ASM实例参数文件的磁盘组。
# ./srvctl remove diskgroup -g ocrvdisk -f$ sqlplus / as sysasmSQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 11 09:54:08 2012Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit ProductionWith the Automat开发云主机域名ic Storage Management optionSQL> drop diskgroup ocrvdisk including contents;Diskgroup dropped. 删除OCRVDISK磁盘组。
5.DROP OCRVDISK磁盘组之后观察Grid重启效果。
# ./crsctl stop hasCRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘ncappweb2’CRS-2673: Attempting to stop ‘ora.mtorcl.db’ on ‘ncappweb2’CRS-2673: Attempting to stop ‘ora.LISTENER.lsnr’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.mtorcl.db’ on ‘ncappweb2’ succeededCRS-2673: Attempting to stop ‘ora.DATA01.dg’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.DATA01.dg’ on ‘ncappweb2’ succeededCRS-2673: Attempting to stop ‘ora.asm’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.asm’ on ‘ncappweb2’ succeededCRS-2673: Attempting to stop ‘ora.cssd’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.cssd’ on ‘ncappweb2’ succeededCRS-5014: Agent “/u01/app/11.2.0/grid/bin/oraagent.bin” timed out starting process “/u01/app/11.2.0/grid/bin/lsnrctl” for action “stop”: details at “(:CLSN00009:)” in “/u01/app/11.2.0/grid/log/ncappweb2/agent/ohasd/oraagent_grid/oraagent_grid.log”CRS-5017: The resource action “ora.LISTENER.lsnr stop” encountered the following error:(:CLSN00009:)Utils:execCmd aborted. For details refer to “(:CLSN00108:)” in “/u01/app/11.2.0/grid/log/ncappweb2/agent/ohasd/oraagent_grid/oraagent_grid.log”.CRS-2677: Stop of ‘ora.LISTENER.lsnr’ on ‘ncappweb2’ succeededCRS-2679: Attempting to clean ‘ora.LISTENER.lsnr’ on ‘ncappweb2’CRS-2681: Clean of ‘ora.LISTENER.lsnr’ on ‘ncappweb2’ succeededCRS-2673: Attempting to stop ‘ora.evmd’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.evmd’ on ‘ncappweb2’ succeededCRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘ncappweb2’ has completedCRS-4133: Oracle High Availability Services has been stopped.## ./crsctl start hasCRS-4123: Oracle High Availability Services has been started.#./crsctl stat res -t——————————————————————————–NAME TARGET STATE SERVER STATE_DETAILS ——————————————————————————–Local Resources——————————————————————————–ora.DATA01.dg ONLINE ONLINE ncappweb2 ora.LISTENER.lsnr ONLINE ONLINE ncappweb2 ora.asm ONLINE ONLINE ncappweb2 Started ora.ons OFFLINE OFFLINE ncappweb2 ——————————————————————————–Cluster Resources——————————————————————————–ora.cssd 1 ONLINE ONLINE ncappweb2 ora.diskmon 1 OFFLINE OFFLINE ora.evmd 1 ONLINE ONLINE ncappweb2 ora.mtorcl.db 1 ONLINE ONLINE ncappweb2 Open ASM实例正常启动。$ cd $GRID_HOME/dbs$ lsab_+ASM.dat hc_+ASM.dat init.ora orapw+ASM 从上面的输出可以看出,srvctl modify asm命令并不会创建实例的SPFILE参数文件,但是srvctl add asm命令会为ASM实例创建默认值的参数文件,这点是有差别的,所以我们还可以通过执行srvctl remove asm和srvctl add asm命令实现对ASM参数文件位置的修改,且还创建相应位置的参数文件。 从上面的例子看出,即使没有ASM实例的参数文件,ASM实例依然可以正常启动,Oracle应该为ASM实例设定了默认的启动参数。# su – grid$ sqlplus / as sysasmSQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 11 09:57:49 2012Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit ProductionWith the Automatic Storage Management optionSQL> show parameter spfileNAME TYPE———————————— ———————-VALUE——————————spfile string SPFILE参数值依然不存在。
6.手动创建SPFILE文件。
SQL> create spfile from memory;File created.$ lsab_+ASM.dat hc_+ASM.dat init.ora orapw+ASM spfile+ASM.ora$$$ strings spfile*.ora*.__large_pool_size=12M*._aggregation_optimization_settings=0*._always_anti_join=’CHOOSE’*._always_semi_join=’CHOOSE’*._and_pruning_enabled=TRUE*._b_tree_bitmap_plans=TRUE*._bloom_filter_enabled=TRUE*._bloom_folding_enabled=TRUE*._bloom_pruning_enabled=TRUE*._complex_view_merging=TRUE*._compression_compatibility=’11.2.0’*._connect_by_use_union_all=’TRUE’*._convert_set_to_join=FALSE*._cost_equality_semi_join=TRUE*._cpu_to_io=0*._dimension_skip_null=TRUE*._eliminate_common_subexpr=TRUE……
7.重启Grid。
# ./crsctl stop hasCRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘ncappweb2’CRS-2673: Attempting to stop ‘ora.mtorcl.db’ on ‘ncappweb2’CRS-2673: Attempting to stop ‘ora.LISTENER.lsnr’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.mtorcl.db’ on ‘ncappweb2’ succeededCRS-2673: Attempting to stop ‘ora.DATA01.dg’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.DATA01.dg’ on ‘ncappweb2’ succeededCRS-2673: Attempting to stop ‘ora.asm’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.asm’ on ‘ncappweb2’ succeededCRS-2673: Attempting to stop ‘ora.cssd’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.cssd’ on ‘ncappweb2’ succeededCRS-5014: Agent “/u01/app/11.2.0/grid/bin/oraagent.bin” timed out starting process “/u01/app/11.2.0/grid/bin/lsnrctl” for action “stop”: details at “(:CLSN00009:)” in “/u01/app/11.2.0/grid/log/ncappweb2/agent/ohasd/oraagent_grid/oraagent_grid.log”CRS-5017: The resource action “ora.LISTENER.lsnr stop” encountered the following error:(:CLSN00009:)Utils:execCmd aborted. For details refer to “(:CLSN00108:)” in “/u01/app/11.2.0/grid/log/ncappweb2/agent/ohasd/oraagent_grid/oraagent_grid.log”.CRS-2677: Stop of ‘ora.LISTENER.lsnr’ on ‘ncappweb2’ succeededCRS-2679: Attempting to clean ‘ora.LISTENER.lsnr’ on ‘ncappweb2’CRS-2681: Clean of ‘ora.LISTENER.lsnr’ on ‘ncappweb2’ succeededCRS-2673: Attempting to stop ‘ora.evmd’ on ‘ncappweb2’CRS-2677: Stop of ‘ora.evmd’ on ‘ncappweb2’ succeededCRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘ncappweb2’ has completedCRS-4133: Oracle High Availability Services has been stopped.# ./crsctl start hasCRS-4123: Oracle High Availability Services has been started.# ./crsctl stat res -t——————————————————————————–NAME TARGET STATE SERVER STATE_DETAILS ——————————————————————————–Local Resources——————————————————————————–ora.DATA01.dg ONLINE ONLINE ncappweb2 ora.LISTENER.lsnr ONLINE ONLINE ncappweb2 ora.asm ONLINE ONLINE ncappweb2 Started ora.ons OFFLINE OFFLINE ncappweb2 ——————————————————————————–Cluster Resources——————————————————————————–ora.cssd 1 ONLINE ONLINE ncappweb2 ora.diskmon 1 OFFLINE OFFLINE ora.evmd 1 ONLINE ONLINE ncappweb2 ora.mtorcl.db 1 ONLINE ONLINE ncappweb2 Open # su – grid$ sqlplus / as sysasmSQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 11 10:06:20 2012C开发云主机域名opyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit ProductionWith the Automatic Storage Management optionSQL> show parameter spfileNAME TYPE———————————— ———————-VALUE——————————spfile string/u01/app/11.2.0/grid/dbs/spfile+ASM.oraSQL> show parameter diskNAME TYPE———————————— ———————-VALUE——————————asm_diskgroups stringDATA01asm_diskstring stringSQL> alter system set asm_diskstring=’/dev/rhdisk*’;System altered.SQL> show parameter diskNAME TYPE———————————— ———————-VALUE——————————asm_diskgroups stringDATA01asm_diskstring string/dev/rhdisk* 从这个例子可以看出,修改现存环境的ASM参数文件位置,首先是创建新位置的SPFILE文件,之后使用srvctl modify asm命令调整SPFILE的位置,最后重启Grid软件以验证ASM参数位置修改效果。以上就是11gR2如何修改Grid软件ASM的参数文件位置,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注开发云行业资讯频道。
本文从转载,原作者保留一切权利,若侵权请联系删除。
《11gR2如何修改Grid软件ASM的参数文件位置》来自互联网同行内容,若有侵权,请联系我们删除!
还没有评论,来说两句吧...