11gR2修改Grid軟體ASM例項引數檔案位置
相關文章:
《11gR2手動建立的ASM例項無法被Clusterware管理的問題的解決》:http://space.itpub.net/23135684/viewspace-743090
《11gR2手動建立ASM例項ORA-29786錯誤解決方法》:http://space.itpub.net/23135684/viewspace-743018
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引數位置修改效果。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28211342/viewspace-2131869/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20191128]11GR2 asm例項audit檔案.txtASM
- Oracle RAC修改引數檔案位置Oracle
- ASM單例項安裝後,需要手動設定ASM的引數檔案ASM單例
- Oracle 11gR2 ASM例項記憶體管理OracleASM記憶體
- Java 例項 - 修改檔案最後的修改日期Java
- mac修改zcompdump檔案生成位置Mac
- ASM有自己的引數、密碼、alert、監聽檔案ASM密碼
- 可變引數例項
- Mac檔案修改軟體——File Peek for macMac
- PbootCMS後臺檔案修改路徑位置boot
- RAC+DG(asm單例項)ASM單例
- 【Oracle】ASM例項安裝入門OracleASM
- Java 例項 - 檔案寫入Java
- 3.1.2.2通過 SQL*Plus 使用非預設初始化引數檔案啟動例項SQL
- 【RAC】asm_diskgroups 引數ASM
- 修改資料檔案的位置的兩種方法
- oracle 修改資料檔案位置(路徑)(移動)Oracle
- PHP+Mysql統計檔案下載次數例項PHPMySql
- C#out引數的簡單例項C#單例
- 將RAC軟體轉換為單例項軟體單例
- 呀!ASM例項起不來可咋整ASM
- 【ASM】ASM資料檔案和OS檔案(FILESYSTEM)轉移方法總結ASM
- sqlserver修改例項名稱SQLServer
- Oracle:ASM & 密碼檔案OracleASM密碼
- win10系統如何修改臨時tmp檔案位置Win10
- Oracle RAC引數檔案管理Oracle
- [20180413]bash 位置引數.txt
- 例項分析JAVA CLASS的檔案結構Java
- Java Class檔案結構例項分析(下)Java
- Java Class檔案結構例項分析(上)Java
- 掛載檔案系統mount命令引數選項-linux命令入門Linux
- 修改 bam 檔案中染色體名
- ASM叢集檔案系統ACFS(ASM Cluster File System)ASM
- ORA-15040: asm_diskstring引數 is incompleteASM
- 軟體專案管理 6.7.引數估演算法專案管理演算法
- Exploorer近期檔案位置
- Argo 安裝和 workflow 例項配置檔案解析Go
- Nginx 配置檔案引數詳解Nginx
- MySQL引數檔案沒有生效MySql