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
相关推荐
沉到海底去吧Go8 小时前
【图片识别改名】如何批量将图片按图片上文字重命名?自动批量识别图片文字并命名,基于图片文字内容改名,WPF和京东ocr识别的解决方案
ocr·wpf·图片识别改名·图片识别重命名·图片内容改名
TextIn智能文档云平台1 天前
从OCR到Document Parsing,AI时代的非结构化数据处理发生了什么改变?
人工智能·自然语言处理·ocr·pdf解析·textin·复杂文档解析
mulannanlu1 天前
免费开源Umi-OCR,离线使用,批量精准!
ocr
凌康ACG2 天前
易语言使用OCR
c++·yolo·c#·ocr·易语言
开开心心就好2 天前
小巧实用,Windows文件夹着色软件推荐
java·开发语言·前端·决策树·c#·ocr·动态规划
郑知鱼3 天前
【拥抱鸿蒙】HarmonyOS NEXT实现双路预览并识别文字
华为·ocr·harmonyos·鸿蒙·移动端·鸿蒙next·ohos
rick_grace5 天前
使用 pytesseract 构建一个简单 OCR demo
ocr
开开心心就好5 天前
高效合并 Excel 表格实用工具
开发语言·javascript·python·qt·r语言·ocr·excel
放飞自我的Coder5 天前
【maker-pdf 文档文字识别(包含ocr),安装使用完整教程】
python·ocr·marker-pdf
天天代码码天天7 天前
PP-OCRv5 C++封装DLL C#调用源码分享
开发语言·c++·c#·ocr