中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

11gR2如何修改Grid軟件ASM的參數文件位置

發布時間:2021-11-06 15:12:02 來源:億速云 閱讀:187 作者:柒染 欄目:建站服務器

本篇文章給大家分享的是有關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.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

        上面是使用默認方式創建好的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 -h

Modifies the configuration for ASM.

Usage: srvctl modify asm [-l <lsnr_name>] [-p <spfile>] [-d <asm_diskstring>]

    -l <lsnr_name>           Listener name

    -p <spfile>              Server parameter file path

    -d <asm_diskstring>      ASM diskgroup discovery string

    -h                       Print usage

# ./srvctl config asm

ASM home: /u01/app/11.2.0/grid

ASM listener: LISTENER

Spfile: +OCRVDISK/asm/asmparameterfile/registry.253.793652513

ASM diskgroup discovery string: 

# su - grid

$ cd /u01/app/11.2.0/grid/dbs/

$ ls

ab_+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 has

CRS-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' succeeded

CRS-2673: Attempting to stop 'ora.DATA01.dg' on 'ncappweb2'

CRS-2677: Stop of 'ora.DATA01.dg' on 'ncappweb2' succeeded

CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'ncappweb2' succeeded

CRS-2677: Stop of 'ora.OCRVDISK.dg' on 'ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'ncappweb2'

CRS-2677: Stop of 'ora.asm' on 'ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'ncappweb2'

CRS-2677: Stop of 'ora.cssd' on 'ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.evmd' on 'ncappweb2'

CRS-2677: Stop of 'ora.evmd' on 'ncappweb2' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ncappweb2' has completed

CRS-4133: Oracle High Availability Services has been stopped.

# ./crsctl start has

CRS-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 asm

ASM home: /u01/app/11.2.0/grid

ASM listener: LISTENER

Spfile: /u01/app/11.2.0/grid/dbs/spfile+ASM.ora

ASM diskgroup discovery string: 

# su - grid

$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 11 09:50:55 2012

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Automatic Storage Management option

SQL> show parameter spfile

NAME                                 TYPE

------------------------------------ ----------------------

VALUE

------------------------------

spfile                               string

        連接到ASM實例,但是并看不到SPFILE參數被指定了值。

4.刪除存儲ASM實例參數文件的磁盤組。

# ./srvctl remove diskgroup -g ocrvdisk -f

$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 11 09:54:08 2012

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Automatic Storage Management option

SQL> drop diskgroup ocrvdisk including contents;

Diskgroup dropped.

        刪除OCRVDISK磁盤組。

5.DROP OCRVDISK磁盤組之后觀察Grid重啟效果。

# ./crsctl stop has

CRS-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' succeeded

CRS-2673: Attempting to stop 'ora.DATA01.dg' on 'ncappweb2'

CRS-2677: Stop of 'ora.DATA01.dg' on 'ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'ncappweb2'

CRS-2677: Stop of 'ora.asm' on 'ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'ncappweb2'

CRS-2677: Stop of 'ora.cssd' on 'ncappweb2' succeeded

CRS-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' succeeded

CRS-2679: Attempting to clean 'ora.LISTENER.lsnr' on 'ncappweb2'

CRS-2681: Clean of 'ora.LISTENER.lsnr' on 'ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.evmd' on 'ncappweb2'

CRS-2677: Stop of 'ora.evmd' on 'ncappweb2' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ncappweb2' has completed

CRS-4133: Oracle High Availability Services has been stopped.

# ./crsctl start has

CRS-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

$ ls

ab_+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 sysasm

SQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 11 09:57:49 2012

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Automatic Storage Management option

SQL> show parameter spfile

NAME                                 TYPE

------------------------------------ ----------------------

VALUE

------------------------------

spfile                               string

        SPFILE參數值依然不存在。

6.手動創建SPFILE文件。

SQL> create spfile from memory;

File created.

$ ls

ab_+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_com

mon_subexpr=TRUE

......

7.重啟Grid。

# ./crsctl stop has

CRS-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' succeeded

CRS-2673: Attempting to stop 'ora.DATA01.dg' on 'ncappweb2'

CRS-2677: Stop of 'ora.DATA01.dg' on 'ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'ncappweb2'

CRS-2677: Stop of 'ora.asm' on 'ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'ncappweb2'

CRS-2677: Stop of 'ora.cssd' on 'ncappweb2' succeeded

CRS-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' succeeded

CRS-2679: Attempting to clean 'ora.LISTENER.lsnr' on 'ncappweb2'

CRS-2681: Clean of 'ora.LISTENER.lsnr' on 'ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.evmd' on 'ncappweb2'

CRS-2677: Stop of 'ora.evmd' on 'ncappweb2' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ncappweb2' has completed

CRS-4133: Oracle High Availability Services has been stopped.

# ./crsctl start has

CRS-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 sysasm

SQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 11 10:06:20 2012

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Automatic Storage Management option

SQL> show parameter spfile

NAME                                 TYPE

------------------------------------ ----------------------

VALUE

------------------------------

spfile                               string

/u01/app/11.2.0/grid/dbs/spfil

e+ASM.ora

SQL> show parameter disk

NAME                                 TYPE

------------------------------------ ----------------------

VALUE

------------------------------

asm_diskgroups                       string

DATA01

asm_diskstring                       string

SQL> alter system set asm_diskstring='/dev/rhdisk*';

System altered.

SQL> show parameter disk

NAME                                 TYPE

------------------------------------ ----------------------

VALUE

------------------------------

asm_diskgroups                       string

DATA01

asm_diskstring                       string

/dev/rhdisk*

        從這個例子可以看出,修改現存環境的ASM參數文件位置,首先是創建新位置的SPFILE文件,之后使用srvctl modify asm命令調整SPFILE的位置,最后重啟Grid軟件以驗證ASM參數位置修改效果。

以上就是11gR2如何修改Grid軟件ASM的參數文件位置,小編相信有部分知識點可能是我們日常工作會見到或用到的。希望你能通過這篇文章學到更多知識。更多詳情敬請關注億速云行業資訊頻道。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

甘泉县| 西平县| 沁水县| 望谟县| 娄烦县| 碌曲县| 军事| 临朐县| 铜梁县| 晋宁县| 兰考县| 阿城市| 青龙| 涪陵区| 大名县| 海南省| 三都| 南召县| 霍城县| 松阳县| 从江县| 报价| 博野县| 泰兴市| 汶上县| 博罗县| 仲巴县| 肃宁县| 宁陕县| 留坝县| 永德县| 木里| 绵竹市| 通城县| 长治市| 米泉市| 文山县| 岳阳市| 绥滨县| 黄大仙区| 治县。|