OCR迁移

一、环境

操作系统:Centos57.6

数据库版本:12.2.0.1

场景:将OCR信息从+DATA磁盘组迁移到+OCR磁盘组

二、操作步骤

1.查看可用空盘

复制代码
set lin 200
set pagesize 200
col DGNAME format a15
col DISKNAME format a15
col PATH format a20
col NAME format a20
select NAME,MOUNT_STATUS,STATE,DISK_NUMBER "DNO",PATH,TOTAL_MB,FREE_MB,GROUP_NUMBER "GNO" from  /* 如果name为空,那么是没有加入磁盘组 */v$ASM_DISK 
order by NAME;
NAME                 MOUNT_S STATE           DNO PATH                   TOTAL_MB    FREE_MB        GNO
-------------------- ------- -------- ---------- -------------------- ---------- ---------- ----------
ARC_0000             CACHED  NORMAL            0 /dev/asm-arc               2048        921          1
DATA_0000            CACHED  NORMAL            0 /dev/asm-data             10240       7185          2
REDO_0000            CACHED  NORMAL            0 /dev/asm-redo              5120       5025          4
                     CLOSED  NORMAL            0 /dev/asm-ocr                  0          0          0

2.创建磁盘组

复制代码
create diskgroup OCR external redundancy disk
'/dev/asm-ocr' attribute 'au_size'='1M','compatible.asm'='11.2','compatible.rdbms'='10.1';

3.ocr加入新建磁盘组

复制代码
[root@rac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3124
         Available space (kbytes) :     258996
         ID                       :  161991732
         Device/File Name         :      +data
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded
   [root@rac1 bin]# ./ocrconfig  -add +OCR
[root@rac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3128
         Available space (kbytes) :     258992
         ID                       :  161991732
         Device/File Name         :      +data
                                    Device/File integrity check succeeded
         Device/File Name         :       +OCR
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

4.OCR删除老磁盘组

复制代码
[root@rac1 bin]# ./ocrconfig -delete +DATA
[root@rac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3128
         Available space (kbytes) :     258992
         ID                       :  161991732
         Device/File Name         :       +OCR
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

5.替换仲裁盘

复制代码
[root@rac1 bin]# ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   aa1f2ffde3624f59bf3b76a5f14c3142 (/dev/asm-data) [DATA]
Located 1 voting disk(s).
[root@rac1 bin]# ./crsctl replace votedisk +OCR
Successful addition of voting disk 9e3d3f3ba1ba4f6ebf67db7ec6fa6fff.
Successful deletion of voting disk aa1f2ffde3624f59bf3b76a5f14c3142.
Successfully replaced voting disk group with +OCR.
CRS-4266: Voting file(s) successfully replaced
[root@rac1 bin]# ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   9e3d3f3ba1ba4f6ebf67db7ec6fa6fff (/dev/asm-ocr) [OCR]
Located 1 voting disk(s).

6.重建spfile到新磁盘组

复制代码
ASMCMD> spget
+DATA/rac-cluster/asmparameterfile/registry.253.1188043365
SQL> create pfile='/home/grid/pfile.ora' from spfile;
File created.
SQL> create spfile='+OCR' from pfile='/home/grid/pfile.ora';
File created.
exit

ASMCMD> spget
+OCR/rac-cluster/asmparameterfile/registry.253.1197525347

7.move密码文件(11G版本忽略此步骤)

复制代码
[:grid]:/home/grid>asmcmd
ASMCMD>  pwcopy --asm +DATA/orapwASM  /home/grid/orapwASM_backup -f
copying +DG_OCR/orapwASM ->  /home/grid/orapwASM_backup
ASMCMD>  pwmove --asm +DATA/orapwASM  +OCR/orapwASM -f
moving +DATA/orapwASM -> ++OCR/orapwASM
ASMCMD> exit
[:grid]:/home/grid>srvctl config asm
ASM home: <CRS home>
Password file: +OCR/orapwASM
Backup of Password file: 
ASM listener: LISTENER
ASM instance count: 3
Cluster ASM listener: ASMNET1LSNR_ASM
相关推荐
翔云 OCR API3 小时前
API让文档信息“活”起来:通用文档识别接口-开发者文字识别API
前端·数据库·人工智能·mysql·ocr
Chunyyyen1 天前
【第二十六周】OCR学习01
学习·计算机视觉·ocr
恶猫2 天前
STranslate 翻译 工具 v2.0.0 绿色便携版 翻译、OCR工具
ocr·文字识别·自动翻译·翻译·划词翻译·截图翻译
垦***耪2 天前
台达 DVP ES2 与 3 台英威腾 GD 通讯程序(TDES - 12)开发实战
ocr
MonkeyKing_sunyuhua3 天前
使用ARQ做PDF OCR和 图片OCR的任务的方案
pdf·ocr
kevin 13 天前
合同盖章前,如何比对差异,确保纸质版与电子版100%一致?
人工智能·自动化·ocr
AI人工智能+3 天前
授权委托书识别技术:利用深度学习和NLP实现纸质文档的智能解析
ocr·文档抽取·授权委托书识别
大强同学3 天前
ShareX - 错误:英语 language is not available in this system for OCR.
ocr
不惑_4 天前
在 Rokid 眼镜上实现工业巡检与 OCR,识别、理解与指导的现场智能
ocr
翔云 OCR API4 天前
赋能文档的数字化智能处理:通用文字/文档/合同识别接口
开发语言·人工智能·python·计算机视觉·ocr