温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

单机ASM替换存储和主机

发布时间:2020-07-23 23:31:52 来源:网络 阅读:449 作者:llc018198 栏目:关系型数据库

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;


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




向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI