How to move ASM spfile to a different disk group

2024-05-29 21:38

本文主要是介绍How to move ASM spfile to a different disk group,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

版权声明: https://blog.csdn.net/tianlesoftware/article/details/6347461
         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:
        Create intermediate pfile from the current spfile
        Create spfile in a new disk group from the intermediate pfile
        Restart the HA stack to verify that ASM starts up fine with moved spfile
        Remove the original spfile
  方法二:or use 'asmcmd spcopy' command
        Copy spfile with -u option - to update GPnP profile in RAC environment
        Restart the HA stack to verify that ASM starts up fine with copiedspfile
        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
-------------------------------------------------------------------------------------------------------
QQ: 492913789
Email: ahdba@qq.com
Blog: http://www.cndba.cn/dave
DBA1 群:62697716(满);   DBA2 群:62697977(满)   DBA3 群:62697850(满)  
DBA 超级群:63306533(满);  DBA4 群: 83829929  DBA5群: 142216823   
聊天 群:40132017   聊天2群:69087192
--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请https://img-blog.csdnimg.cn/20190217105710569.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3UwMTEwNzgxNDE=,size_16,color_FFFFFF,t_70《算法导论 第三版英文版》_高清中文版.pdf
https://pan.baidu.com/s/17D1kXU6dLdU0YwHM2cvNMw
《深度学习入门:基于Python的理论与实现》_高清中文版.pdf
https://pan.baidu.com/s/1IeVs35f3gX5r6eAdiRQw4A
《深入浅出数据分析》_高清中文版.pdf
https://pan.baidu.com/s/1GV-QNbtmjZqumDkk8s7z5w
《Python编程:从入门到实践》_高清中文版.pdf
https://pan.baidu.com/s/1GUNSg4mdpeOf1LC_MjXunQ
《Python科学计算》_高清中文版.pdf
https://pan.baidu.com/s/1-hDKhK-7rDDFll_UFpKmpw

这篇关于How to move ASM spfile to a different disk group的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1014708

相关文章

matlab读取NC文件(含group)

matlab读取NC文件(含group): NC文件数据结构: 代码: % 打开 NetCDF 文件filename = 'your_file.nc'; % 替换为你的文件名% 使用 netcdf.open 函数打开文件ncid = netcdf.open(filename, 'NC_NOWRITE');% 查看文件中的组% 假设我们想读取名为 "group1" 的组groupName

Unity3D 运动之Move函数和translate

CharacterController.Move 移动 function Move (motion : Vector3) : CollisionFlags Description描述 A more complex move function taking absolute movement deltas. 一个更加复杂的运动函数,每次都绝对运动。 Attempts to

AI辅助编程里的 Atom Group 的概念和使用

背景 在我们实际的开发当中,一个需求往往会涉及到多个文件修改,而需求也往往有相似性。 举个例子,我经常需要在 auto-coder中需要添加命令行参数,通常是这样的: /coding 添加一个新的命令行参数 --chat_model 默认值为空 实际上这个需求涉及到以下文件列表: /Users/allwefantasy/projects/auto-coder/src/autocoder/auto

12C 新特性,MOVE DATAFILE 在线移动 包括system, 附带改名 NID ,cdb_data_files视图坏了

ALTER DATABASE MOVE DATAFILE  可以改名 可以move file,全部一个命令。 resue 可以重用,keep好像不生效!!! system照移动不误-------- SQL> select file_name, status, online_status from dba_data_files where tablespace_name='SYSTEM'

group by 新体会

group by 分组语句中的 select 后面查询的东西,只能是 group by 中的字段或聚合函数,如果含有group by 中的没有的字段,sql 会报错。 表users   例子:  1.select count(1),sex from users group by sex; sql执行正确   2.select count(id),sex from users gr

ASM 10G 基于RMAN 迁移

ASM 10G 基于RMAN 迁移 场景 单节点基于10G R2 的数据库,其数据文件及日志文件均存放在ASM 里,现在为业务需求,将此数据库做迁 移,迁移到另个机房,但是两个机房的网络是通畅的,为尽量减少数据的丢失及平稳迁移和经济实惠,迁 移时,数据库需停应用 工具 本次采用RMAN 的duplicate 命令来进行迁移,运用此命令简化复杂度; 一、源库和目标库的

【Python报错已解决】`AttributeError: move_to requires a WebElement`

🎬 鸽芷咕:个人主页  🔥 个人专栏: 《C++干货基地》《粉丝福利》 ⛺️生活的理想,就是为了理想的生活! 文章目录 引言:一、问题描述:1.1 报错示例:1.2 报错分析:1.3 解决思路: 二、解决方法:2.1 方法一:正确获取并传递WebElement对象2.2 步骤二:使用find_element_by_*方法直接获取元素 三、其

[LeetCode] 283. Move Zeroes

题:https://leetcode.com/problems/move-zeroes/submissions/1 题目 Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements. Ex

【Mysql】系统服务启动访问报错问题处理:this is incompatible with sql_mode=only_full_group_by

一、背景: 本来已经正常运行的平台,突然有一天由于对服务器进行部分操作迁移,发现jar可以正常启动,但是访问功能一直报错,监控后台日志后,发现了问题: 报错的具体信息如下: Caused by: java.sql.SQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and conta

Page directive: illegal to have multiple occurrences of contentType with different values (x,X)之解

Question: Page directive: illegal to have multiple occurrences of contentType with different values (old: text/html; charset=utf-8, new: text/html;charset=UTF-8) Analysis: 出现这个的原因是这两个jsp的contentT