单机ASM替换存储和主机

oracle ASM替换存储和主机:

1.在新的主机当安装单机GRID,和数据库软件,可以从源主机上拷贝,然后克隆操作

2.把新的存储挂在旧的主机上,建立新的磁盘组,用back as copy 把数据库备份到新的磁盘组上,然后

新的存储从旧的主机上取消映射,

3.把旧的OCR 导出,并导入新的主机上,

./ocrconfig -export /tmp/033_asm.ocr

./ocrconfig -export /tmp/053_asm.ocr

./ocrconfig -import /tmp/ocr.bak

4.重新启动crs,可以看到磁盘组已经在新的主机上挂载了。

5.修改控制文件和数据文件路径:

SQL> ALTER SYSTEM SET DB_CREATE_FILE_DEST=‘+DATA‘ SID=‘*‘;

System altered.

SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=100G SID=‘*‘;

System altered.

SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST=‘+FRA‘ SID=‘*‘;

SQL>  ALTER SYSTEM SET CONTROL_FILES=‘+DATA‘,‘+FRA‘ SCOPE=SPFILE SID=‘*‘;

System altered.

从源主机上拷贝控制文件,恢复到目标主机上

alter database mount;

SWITCH DATABASE TO COPY;

recover database

;;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 06/22/2016 20:35:05
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of archived log for thread 1 with sequence 2274 and starting SCN of 64377780446 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2273 and starting SCN of 64375042569 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2272 and starting SCN of 64371781040 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2271 and starting SCN of 64369148011 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2270 and starting SCN of 64367907974 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2269 and starting SCN of 64366653696 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2268 and starting SCN of 64363294087 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2267 and starting SCN of 64358391536 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2266 and starting SCN of 64352846715 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2265 and starting SCN of 64352844045 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2264 and starting SCN of 64352832699 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2263 and starting SCN of 64352555519 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2262 and starting SCN of 64349448092 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2261 and starting SCN of 64348058197 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2260 and starting SCN of 64346601983 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2259 and starting SCN of 64344758678 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2258 and starting SCN of 64343087188 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2257 and starting SCN of 64340524960 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 2256 and starting SCN of 64340493278 found to restor

在源主机上备份这些日志

backup as copy archivelog sequence between 2248 and 2274 thread 1 format ‘/app/bak0622_arch/archivelog_%U.%T‘;

拷贝到目标机;

然后catalog start with

RMAN>  catalog start with ‘/app/oracle/bak_arch/‘;

searching for all files that match the pattern /app/oracle/bak_arch/

List of Files Unknown to the Database
=====================================
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2256_T-1_A-909648652_2gr8qaih.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2257_T-1_A-909648652_2hr8qaj0.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2258_T-1_A-909648652_2ir8qajf.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2259_T-1_A-909648652_2jr8qaju.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2260_T-1_A-909648652_2kr8qakd.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2261_T-1_A-909648652_2lr8qaks.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2262_T-1_A-909648652_2mr8qall.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2263_T-1_A-909648652_2nr8qam4.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2264_T-1_A-909648652_2or8qamt.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2265_T-1_A-909648652_2pr8qanm.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2266_T-1_A-909648652_2qr8qaof.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2267_T-1_A-909648652_2rr8qap8.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2268_T-1_A-909648652_2sr8qaq1.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2269_T-1_A-909648652_2tr8qaqh.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2270_T-1_A-909648652_2ur8qara.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2271_T-1_A-909648652_2vr8qas3.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2272_T-1_A-909648652_30r8qasi.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2273_T-1_A-909648652_31r8qat1.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2274_T-1_A-909648652_32r8qatg.20160622

Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2256_T-1_A-909648652_2gr8qaih.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2257_T-1_A-909648652_2hr8qaj0.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2258_T-1_A-909648652_2ir8qajf.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2259_T-1_A-909648652_2jr8qaju.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2260_T-1_A-909648652_2kr8qakd.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2261_T-1_A-909648652_2lr8qaks.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2262_T-1_A-909648652_2mr8qall.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2263_T-1_A-909648652_2nr8qam4.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2264_T-1_A-909648652_2or8qamt.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2265_T-1_A-909648652_2pr8qanm.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2266_T-1_A-909648652_2qr8qaof.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2267_T-1_A-909648652_2rr8qap8.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2268_T-1_A-909648652_2sr8qaq1.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2269_T-1_A-909648652_2tr8qaqh.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2270_T-1_A-909648652_2ur8qara.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2271_T-1_A-909648652_2vr8qas3.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2272_T-1_A-909648652_30r8qasi.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2273_T-1_A-909648652_31r8qat1.20160622
File Name: /app/oracle/bak_arch/archivelog_arch_D-TEST_id-2207710614_S-2274_T-1_A-909648652_32r8qatg.20160622

再RECOVER database;

处理临时表空间和日志文件

时间: 2024-10-13 10:50:36

单机ASM替换存储和主机的相关文章

Oracle RAC集群搭建-ASM共享存储卷

01, ASM共享存储卷 安装集群的话,必须要有共享磁盘,目的是为作裁决磁盘使用.还需要有数据文件的共享磁盘 02,规划 主机 磁盘 rac1        1G rac2 共享rac1的磁盘 03,vsphere配置 rac1主机配置 添加的这一块只是用作裁决磁盘,并不是用来存储数据的,所以磁盘空间可以小一点. 选择一个主机存放的磁盘一定要选择“厚置备置零”(目的是马上分配相应的空间出来):要选择“指定数据存储或数据存储群集" 最后点击完成即可,在页面会看见scsi控制器,把他改成虚拟!! 复

Oracle Data Guard RAC到单机ASM配置(物理standby)

本次配置11G rac到单机ASM的dataguard配置,11G rac的安装参考oracle 11G rac 安装(VMware + rhel6.3),11G 单机ASM安装参考Oracle 11G 单机asm安装. 环境介绍: 主库: 11203 2节点RAC   实例名:racdb1,racdb2  db_name:racdb  db_unique_name:racdb 备库: 11203 单机 ASM   实例名:racdbstd        db_name:racdb  db_un

Oracle 11G 单机asm安装

VMware workstation上oracle 11G ASM的安装 环境: VMware Workstation :9.0.0 build-812388 OS :RedHat Enterprise Linux Server release 6.3 (Santiago) Oracle :11203 磁盘 50G 分别有两块网卡 内存1.5G Swap为内存的2倍 VMware virtual Ethernet adapter 1   192.168.10网段 1.IP规划 192.168.1

简单区别存储与主机连接的三种模式DAS/SAN/NAS

一般来说,存储(Storage)与主机(Host)连接模式有三种:SAN(Storage Area Network)存储区域网络,DAS(Direct-Attached Storage)直连式存储,NAS(Network Attached Storage)网络附属存储.此三种模式分别针对不同的应用场景. 从与主机连接的通道类别来看,DAS采用SCSI通道直接连接主机,但随着服务器CPU的处理能力的增强,存储硬盘空间的不断加大,这个沿用了四十多年的SCSI通道,已成为IO瓶颈,其最高不超过80MB

为VMware ESXi主机添加本地存储的过程及注意事项-之3

3 为服务器添加存储及注意事项 3.1退出维护模式并添加本地存储 当主机再次进入VMware ESXi之后,使用vSphere Client登录vCenter Server,将置于维护模式的主机"退出维护模式"并添加本地存储,主要步骤如下. (1)当主机开机之后,进入VMware ESXi后,在vSphere Client中,可以看到主机已经连接上.右键单击主机,在弹出的快捷菜单中选择"退出维护模式",如图1-4-1所示. 图1-4-1 退出维护模式 (2)在&qu

Oracle 11gR1 RAC存储迁移方案

一.需求Oracle 11gR1 RAC存储计划更换,数据库版本为11.1.0.7,无停机维护窗口. 二.环境准备1.主机环境.OS环境2.安装11.1.0.6.0版Clusterware(linux.x64_11gR1_clusterware.zip)3.安装11.1.0.6.0版RDBMS SOFTWARE(linux.x64_11gR1_database_1013.zip)4.升级到11.1.0.7.0版本(分别升级Clusterware和RDBMS)(p6890831_111070_Li

Oracle HA双机主备基于共享存储模式并利用keepalived管理实现高可用

HA概述 HA(High Available)即由两台计算机组成并对外提供一组相同的服务,也叫做一主一备模式.正常情况下由主服务器提供服务,备服务器处于待机备用,备机可以随时接替主服务器的工作.也就是当主服务器宕机或所提供的服务不可用时,备用服务器会主动激活并且替换主服务器继续提供服务,这时主服务器上的服务资源包括网络(IP).存储.服务(Web/数据库)就会转移到备机接管,从而提供不间断的服务.基于此,便可以将服务器的宕机时间减少到最低,对业务实现不中断或短暂中断. 由一组计算机(多台)组成一

RAW+ASM 的RAC 安装文档

实验平台:Oracle 10gR2 RAC + RHEL 4.0 +VMWare GSX 3.2.0 安装步骤: 1.安装前准备及OS安装配置 2.安装Oracle 10gR2 clusterware 3.安装Oracle 10gR2 database 4.配置netca 5.创建ASM 实例 6.配置dbca创建数据库 7.检查RAC状态 8.RAC 卸载 一. 安装前准备及OS安装配置 Host OS 准备 1. 从Oracle OTN下载 oracle 10gR2 for x86 linu

【转载】Oracle ASM

1.说说你个人理解的存储解决方案的发展趋势. Oracle 7&8 :这个时期的数据库备份方案已经可以使用RMAN 命令,它起源于Oracle 版本8,7的时候还不具备这个功能.可以把数据存储在操作系统的文件系统上和裸设备上.一提到裸设备可能刚进入DBA行当的朋友们不是很熟悉,下面随便简单介绍一下吧. 裸设备:我们把这三个字分开说吧,设备就是指的物理磁盘,像老一点的IDE磁盘,现在常用的SCSI磁盘SAS磁盘等.裸指的是这个磁盘上没有文件系统,一般磁盘在插入到主板上后必须为其创建文件系统(win