移動ASM的spfile到一個新的disk group
在初始安裝完ASM後,ASM的spfile檔案預設在預設的盤組,現在需要將ASM的spfile檔案移入另一個新的盤組內,以下有兩種方式以供實現。
在ASM的文件中說是使用asmcmd spmove來移動,但是在實際的使用過程中會報錯 :
$ asmcmd spmove +DATA/asm/asmparameterfile/REGISTRY.253.715881237 +PLAY/spfileASM.ora
ORA-15032: not all alterations performed
ORA-15028: ASM file '+DATA/asm/asmparameterfile/REGISTRY.253.715881237' not dropped; currently being accessed (DBD ERROR: OCIStmtExecute)
a、從當前的spfile建立pfile
b、透過新建立的pfile在新的磁碟組建立spfile
c、使用新建立的spfile來驗證HA是否正常
d、刪除先前的spfile
2、使用asmcmd spcopy命令:
a、透過指定-u引數來複製spfile,以更新GPnP pfile在RAC環境中
b、透過新的spfile來重啟HA以驗證是否可用
c、移除以前的spfile
以下為在單節點環境中的示例:
1、建立pfile檔案
$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on
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/registry.253.715881237
SQL> create pfile='/tmp/pfile+ASM.ora' from spfile;
File created.
2、透過以上新建立的pfile在新的盤組內建立spfile:
SQL> create spfile='+PLAY' from pfile='/tmp/pfile+ASM.ora';
File created.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option
3、使用新建立的spfile來重啟HA驗證環境:
$ crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on '
...
CRS-4133: Oracle High Availability Services has been stopped.
$ crsctl start has
CRS-4123: Oracle High Availability Services has been started.
4、驗證新的spfile已經使用:
$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on
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 +PLAY/asm/asmparameterfile/registry.253.715963539
SQL> select name, state from v$asm_diskgroup;
NAME STATE
----- -----------
DATA MOUNTED
PLAY MOUNTED
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option
5、也可以使用asmcmd來驗證:
$ asmcmd spget
+PLAY/asm/asmparameterfile/registry.253.715963539
6、移除舊的spfile:
$ asmcmd rm +DATA/asm/asmparameterfile/registry.253.715881237
以下為使用asmcmd spcopy的示例:
1、透過指定-u引數來複製,以此來更新GPnP pfile,在RAC環境中
$ asmcmd spget
+DATA/asm/asmparameterfile/registry.253.722601213
$ asmcmd lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Votin g_files Name
MOUNTED EXTERN N 512 4096 1048576 14658 9814 0 9814 0 N DATA/
MOUNTED EXTERN N 512 4096 1048576 9772 8507 0 8507 0 N PLAY/
MOUNTED EXTERN N 512 4096 1048576 9772 9212 0 9212 0 N RECO/
$ asmcmd spcopy -u +DATA/asm/asmparameterfile/registry.253.722601213 +PLAY/spfileASM.ora
2、重啟HA以驗證新的spfile使用正常:
$ crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ''
...
CRS-4133: Oracle High Availability Services has been stopped.
$ crsctl start has
CRS-4123: Oracle High Availability Services has been started.
$ asmcmd spget
+PLAY/spfileASM.ora
3、移除舊的spfile檔案:
$ asmcmd ls -l +DATA/asm/asmparameterfile
Type Redund Striped Time Sys Name
ASMPARAMETERFILE UNPROT COARSE JUN 25 10:00:00 Y REGISTRY.253.722601213
$ asmcmd rm +DATA/asm/asmparameterfile/registry.253.722601213
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10130206/viewspace-1041368/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle ASM spfile in a disk groupOracleASM
- How to move ASM spfile to a different disk group [ID 1082943.1]ASM
- ASM Disk Group TemplateASM
- Oracle ASM ACFS disk group rebalanceOracleASM
- Oracle ASM Disk Group AttributesOracleASM
- ASM下遷移spfileASM
- ASM disk group mount fails with ORA-15036ASMAI
- ORA-15260: permission denied on ASM disk groupASM
- ASM的資料庫遷移回到DISK上ASM資料庫
- ASM disk group mount fails with ORA-15036: disk is truncated [ID 1077175.1]ASMAI
- ASM Failure Group的一點理解ASMAI
- ASM DISK Group載入ORA-15183錯誤一例ASM
- 如何移動asm磁碟組內的資料檔案到另外一個磁碟組ASM
- 遷移ocr/votedisk/asm spfile所在磁碟組ASM
- ASM Normal需要3個disk ?ASMORM
- 將普通filesystem上的database移動到asm上DatabaseASM
- drop asm disk、撤銷drop asm diskASM
- 幾個重要的 ASM Disk Groups 引數ASM
- 利用RMAN將非ASM檔案移動到ASM裡 - [ASM]ASM
- 【ASM】ASM啟動無法找到spfile問題原因ASM
- 規劃ASM DISK GROUP、檢視asm 磁碟當前狀態、mount or dismount 磁碟組ASM
- asm disk 的結構(1)ASM
- 手工建立ASM Disk Groups、為 ASM Disk Groups 新增 diskASM
- 將asm上的資料庫移動到普通的filesystem上ASM資料庫
- Asm disk managerASM
- ASM Spfile Is Not Used when ASM Instance StartsASM
- 將asm上datafile移動到其他的diskgroup或者普通filesystem上ASM
- Oracle ASM Disk DirectoryOracleASM
- Oracle ASM Disk PartnerOracleASM
- Azure ASM到ARM遷移 (三) Reserved IP的遷移ASM
- 【資料遷移】RMAN遷移資料庫到ASM(一)建立ASM磁碟組資料庫ASM
- 建立ASM啟動SPFILE報錯ORA-17502ASM
- Oracle ASM儲存Spfile解析OracleASM
- ASM: Device is already labeled for ASM diskASMdev
- Oracle ASM Disk HeaderOracleASMHeader
- 移動一個帶有lob欄位的表到另外一個表空間的語法
- 遷移已存在的資料庫到ASM中資料庫ASM
- RAC環境ASM磁碟組間修改spfile的位置ASM