How to move ASM spfile to a different disk group [ID 1082943.1]
How to move ASM spfile to a different disk group [ID 1082943.1]
Goal
The goal is to move ASM spfile from one disk group to another.
During initial ASM setup the spfile might have been created in a default disk group (e.g. DATA). The requirement is now to move the ASM spfile to another disk group.
According to Oracle ASM documentation it should be possible to use 'asmcmd spmove' command to move ASM spfile:
Oracle Database Storage Administrator's Guide 11g Release 2 (11.2)
Section ASMCMD Instance Management Commands
Section ASMCMD Instance Management Commands
spmove
Purpose: Moves an Oracle ASM SPFILE from source to destination and automatically updates the GPnP profile.
But an attempt to move the ASM spfile fails as follows:
$ 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)
ORA-15032: not all alterations performed
ORA-15028: ASM file '+DATA/asm/asmparameterfile/REGISTRY.253.715881237' not dropped; currently being accessed (DBD ERROR: OCIStmtExecute)
Solution
To move ASM spfile to another disk group, either make use of intermediate pfile:
1.Create intermediate pfile from the current spfile
2.Create spfile in a new disk group from the intermediate pfile
3.Restart the HA stack to verify that ASM starts up fine with moved spfile
4.Remove the original spfile
2.Create spfile in a new disk group from the intermediate pfile
3.Restart the HA stack to verify that ASM starts up fine with moved spfile
4.Remove the original spfile
or use 'asmcmd spcopy' command
1.Copy spfile with -u option - to update GPnP profile in RAC environment
2.Restart the HA stack to verify that ASM starts up fine with copiedspfile
3.Remove the original spfile
This is an example of moving ASM spfile in a single instance environment, by making use intermediate pfile
2.Restart the HA stack to verify that ASM starts up fine with copiedspfile
3.Remove the original spfile
This is an example of moving ASM spfile in a single instance environment, by making use intermediate pfile
1. Create intermediate pfile from the current 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*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
------- ------- --------------------------------------------------
spfile string +DATA/asm/asmparameterfile/registry.253.715881237
SQL> create pfile='/tmp/pfile+ASM.ora' from spfile;
File created.
2. Create spfile in a new disk group from the intermediate pfile
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
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option
3. Restart the HA stack to verify that ASM starts up fine with moved 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.
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.
CRS-4123: Oracle High Availability Services has been started.
Verify that the new spfile is being used
$ 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
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
------- ------- --------------------------------------------------
spfile string +PLAY/asm/asmparameterfile/registry.253.715963539
SQL> select name, state from v$asm_diskgroup;
NAME STATE
----- -----------
DATA MOUNTED
PLAY MOUNTED
----- -----------
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
The use of new spfile can also be verified with asmcmd as follows:
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option
The use of new spfile can also be verified with asmcmd as follows:
$ asmcmd spget
+PLAY/asm/asmparameterfile/registry.253.715963539
4. Remove the original spfile
+PLAY/asm/asmparameterfile/registry.253.715963539
4. Remove the original spfile
$ asmcmd rm +DATA/asm/asmparameterfile/registry.253.715881237
And this is an example of moving ASM spfile with 'asmcmd spcopy'
1. Copy spfile with -u option - to update GPnP profile in RAC environment
$ asmcmd spget
+DATA/asm/asmparameterfile/registry.253.722601213
+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/
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. Restart the HA stack to verify that ASM starts up fine with copiedspfile
2. Restart the HA stack to verify that ASM starts up fine with copiedspfile
$ crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ''
...
CRS-4133: Oracle High Availability Services has been stopped.
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.
CRS-4123: Oracle High Availability Services has been started.
$ asmcmd spget
+PLAY/spfileASM.ora
3. Remove the original spfile
+PLAY/spfileASM.ora
3. Remove the original 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
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
NOTE: The disk group that holds ASM spfile has to have COMPATIBLE.ASM value of 11.2 or higher.
NOTE: The disk group that holds ASM spfile has to have COMPATIBLE.ASM value of 11.2 or higher.
References
Oracle Database Storage Administrator's Guide 11g Release 2 (11.2), Chapter 3 Administering Oracle ASM Instances, Section Initialization Parameter Files for an Oracle ASM Instance
Oracle Database Storage Administrator's Guide 11g Release 2 (11.2), Section ASMCMD Instance Management Commands
Oracle Database Storage Administrator's Guide 11g Release 2 (11.2), Chapter 3 Administering Oracle ASM Instances, Section Initialization Parameter Files for an Oracle ASM Instance
Oracle Database Storage Administrator's Guide 11g Release 2 (11.2), Section ASMCMD Instance Management Commands
相關內容
--------------------------------------------------------------------------------
產品
--------------------------------------------------------------------------------
產品
--------------------------------------------------------------------------------
•Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition
關鍵字
--------------------------------------------------------------------------------
ASM; AUTOMATIC STORAGE MANAGEMENT; DESTINATION; DISK GROUP; PFILE; SPFILE
錯誤
--------------------------------------------------------------------------------
ORA-15028; ORA-15032; CRS-2673; CRS-2791; CRS-2677; CRS-2793; CRS-4133; CRS-4123
關鍵字
--------------------------------------------------------------------------------
ASM; AUTOMATIC STORAGE MANAGEMENT; DESTINATION; DISK GROUP; PFILE; SPFILE
錯誤
--------------------------------------------------------------------------------
ORA-15028; ORA-15032; CRS-2673; CRS-2791; CRS-2677; CRS-2793; CRS-4133; CRS-4123
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20674423/viewspace-721538/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle ASM spfile in a disk groupOracleASM
- How to move progress database to different OSDatabase
- 移動ASM的spfile到一個新的disk groupASM
- ASM Disk Group TemplateASM
- Oracle ASM ACFS disk group rebalanceOracleASM
- Oracle ASM Disk Group AttributesOracleASM
- How to Move/Recreate GI Management Repository to Different Shared Storage
- ASM disk group mount fails with ORA-15036: disk is truncated [ID 1077175.1]ASMAI
- How to move ASM database files from one diskgroup to anotherASMDatabase
- ASM disk group mount fails with ORA-15036ASMAI
- ASM 11g New Features - How ASM Disk Resync WorksASM
- ORA-15260: permission denied on ASM disk groupASM
- Duplicate database from non ASM to ASM to a different host [ID 382669.1]DatabaseASM
- drop asm disk、撤銷drop asm diskASM
- 規劃ASM DISK GROUP、檢視asm 磁碟當前狀態、mount or dismount 磁碟組ASM
- move linux os from disk A to disk B with 0 lossLinux
- 手工建立ASM Disk Groups、為 ASM Disk Groups 新增 diskASM
- Can you create a second voting disk in a different ASM diskgroup when using External Redundancy in 1ASM
- OCR / Vote disk Maintenance Operations: (ADD/REMOVE/REPLACE/MOVE) [ID 428681.1]AINaNREM
- Asm disk managerASM
- Identify If A Disk/Part Is Still Used By ASM,Used by ASM Or Used by ASM_603210.1IDEASM
- How to Prepare Storage for ASM (Doc ID 452924.1)ASM
- ASM DISK Group載入ORA-15183錯誤一例ASM
- ASM下遷移spfileASM
- ASM Spfile Is Not Used when ASM Instance StartsASM
- Oracle ASM Disk DirectoryOracleASM
- Oracle ASM Disk PartnerOracleASM
- How to Restore a Lost Voting Disk in 10g [ID 279793.1]REST
- How to map device name to ASMLIB disk [ID 1098682.1]devASM
- Different AG groups have the exactly same group_id value if the group names are same and the ‘CLUSTER_TYPE = EXTERNAL/NONE’None
- How To Move The DB Audit Trails To A New TablespaceAI
- How to Move or Copy a Tablespace to Another Database (61)Database
- Oracle ASM儲存Spfile解析OracleASM
- Move datafile:From File System to ASMASM
- Move datafile:From ASM to File SystemASM
- How to Move a Database Using Transportable Tablespaces (文件 ID 1493809.1)Database
- ASM: Device is already labeled for ASM diskASMdev
- Oracle ASM Disk HeaderOracleASMHeader