`
hunxiejun
  • 浏览: 1147843 次
文章分类
社区版块
存档分类
最新评论

How to move ASM spfile to a different disk group

 
阅读更多

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

解决方法:

方法一: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

方法二: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

1. Create intermediate pfile from the current spfile

$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on <date>
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. 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



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 '<server>'
...
CRS-4133: Oracle High Availability Services has been stopped.

$ crsctl start has
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 <date>
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


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

$ 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

$ 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. 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 '<server>'
...
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. 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

$ 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.

From Oracle

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

Blog http://blog.csdn.net/tianlesoftware

Email: dvd.dba@gmail.com

DBA1 群:62697716(); DBA2 群:62697977() DBA3 群:62697850()

DBA 超级群:63306533(); DBA4 群: 83829929 DBA5群: 142216823

聊天 群:40132017 聊天2群:69087192

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

分享到:
评论

相关推荐

    IZO-063-2020版本.docx

    Examine the command to back up the ASM metadata: ASMCMD&gt;md_backup /backup/ASM_backup In which three situations can you use the backup? A. when one or more disks in an ASM disk group are lost B. when ...

    How to view and edit data on ASM using BBED

    How to view and edit data on ASM using BBED

    Oracle asm 性能监控工具

    DiskPath - Path to ASM disk DiskName - ASM disk name Gr - ASM disk group number Dsk - ASM disk number Reads - Reads Writes - Writes AvRdTm - Average read time (in msec) AvWrTm - Average ...

    asm指定路径对pfile和spfile相互创建

    因为asm磁盘组路径的原因,不能直接对pfile-spfile进行创建,需要指定路径进行创建,不然就会报错.

    Oracle 10.2 ASM 最佳实践 最终版本

    Database Initora parameters to support ASM ASM and database shutdown dependencies ASM and database deployment Best Practices Storage Management and Allocation Rebalance and Redistribution Files ...

    ASM实例+ASM数据库安装(Win8+Ora10)

    3.5 新建disk group 13 3.6 检查asm disk的状态以及diskgroup的使用率 14 3.7 把asm diskgroup加入到初始化文件中 14 第四篇 创建使用ASM存储管理的数据库 16 4.1 在存储机制选择中选择ASM 16 4.2 ASM磁盘组信息 17 ...

    asm.jar各个版本

    asm-1.3.3.jar, asm-1.3.4.jar, asm-1.3.5.jar, asm-1.4.1.jar, asm-1.4.2.jar, asm-1.4.3.jar, asm-1.4.jar, asm-1.5.1.jar, asm-1.5.2.jar, asm-1.5.3.jar, asm-2.0.jar, asm-2.1.jar, asm-2.2.1-sources.jar, asm...

    intel asm to at &amp;t asm

    linux下intel asm 转at & t asm

    中国人写的ASM、AAM

    中国人写的ASM、AAM,包括最新的一些改进算法,代码规范,值得学习

    spfile&pfile

    針對oracle 的參數檔spfile&pfile的分析討論

    org.springframework.asm-3.0.1.RELEASE-A.jar

    rg.springframework.asm-3.0.1.RELEASE-A.jar

    AASM远程升级软件资料.rar

    AASM远程升级软件资料,内部包含配药柜的软件开发文件,有远程升级方案研究报告,程序架构,功能手册,用户使用手册,与下位机通讯协议等资料

    汇编工具ASM汇编工具ASM汇编工具ASM汇编工具ASM

    汇编工具ASM汇编工具ASM汇编工具ASM汇编工具ASM汇编工具ASM

    oracle asm学习资料

    storage management and provisioning for the ...management to be done using familiar create/alter/drop SQL statements, DBAs do not need to learn a new skill set or make crucial decisions on provisioning.

    Turbo C 2.00[DISK]

    offer, and write for full details on how to receive a free IntroPak containing a $15 credit toward your first month's on- line charges. 2. Check with your local software dealer or users' group. ...

    rawdevice to asm.doc

    通过RMAN备份数据库ezhouraw 备份数据库,备份归档日志,备份控制文件

    各种oracleasm rpm包(Linux下配置ASM使用)

    包含如下oracleasm包: kmod-oracleasm-2.0.6.rh1-3.el6.x86_64.rpm oracleasm-2.0.8-4.el6_6.src.rpm oracleasm-2.0.8-6.el6_7.src.rpm oracleasm-2.0.8-8.el7.src.rpm oracleasm-2.0.8-15.el7.centos.src.rpm ...

    Moving your SAP database to Oracle 11gR2 ASM

    Moving your SAP database to Oracle 11gR2 ASM A “Best Practices” Guide

    AASM睡眠分期规则.ppt

    AASM睡眠分期规则AASM睡眠分期规则AASM睡眠分期规则AASM睡眠分期规则AASM睡眠分期规则AASM睡眠分期规则AASM睡眠分期规则AASM睡眠分期规则

    EditPlus(附asm.acp,asm.stx)

    EditPlus是很好用的编辑软件 但网上下的很多EP版本需要自己添加asm.acp,asm.stx,不是很方便 这个里面附带了asm.acp,asm.stx

Global site tag (gtag.js) - Google Analytics