In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "what is the backup and recovery method of ocr". In the daily operation, I believe that many people have doubts about the backup and recovery method of ocr. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubt of "what is the backup and recovery method of ocr?" Next, please follow the editor to study!
Operating system version: readhat 6.4
Database version: 11203
1. View cluster status
[root@rac1] # / oracle/app/grid/11.2.0/bin/crsctl stat res-t
NAME TARGET STATE SERVER STATE_DETAILS
Local Resources
Ora.ARC.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
Ora.DATADG01.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
Ora.DATADG02.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
Ora.LISTENER.lsnr
ONLINE OFFLINE rac1
ONLINE ONLINE rac2
Ora.VOTE.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
Ora.asm
ONLINE ONLINE rac1 Started
ONLINE ONLINE rac2 Started
Ora.gsd
OFFLINE OFFLINE rac1
OFFLINE OFFLINE rac2
Ora.net1.network
ONLINE ONLINE rac1
ONLINE ONLINE rac2
Ora.ons
ONLINE ONLINE rac1
ONLINE ONLINE rac2
Cluster Resources
Ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac2
Ora.cvu
1 ONLINE ONLINE rac2
Ora.oc4j
1 ONLINE ONLINE rac1
Ora.orcl.db
1 ONLINE ONLINE rac1 Open
2 ONLINE ONLINE rac2 Open
Ora.rac1.vip
1 ONLINE ONLINE rac1
Ora.rac2.vip
1 ONLINE ONLINE rac2
Ora.scan1.vip
1 ONLINE ONLINE rac2
two。 Check the backup of ocr and manual backup. It doesn't matter if there is no backup of ocr in emergency.
There is an automatic backup of ocr in the cdata directory of $CRS_HOME, which is saved every day and every week by default, and is available as long as no schema changes have been made.
[root@rac1 cdata] # pwd
/ oracle/app/grid/11.2.0/cdata
[root@rac1 cdata] # ls-lrt
The total dosage is 2852
Drwxr-xr-x 2 grid oinstall 4096 January 17 2016 localhost
Drwxr-xr-x 2 grid oinstall 4096 January 17 2016 rac1
-rw- 1 root oinstall 272756736 September 5 07:36 rac1.olr
Drwxrwxr-x 2 grid oinstall 4096 September 5 07:37 rac-cluster
View the unknown ocr disk group and the location of the votingdisk.
[root@rac1 cdata] # / oracle/app/grid/11.2.0/bin/ocrcheck
Status of Oracle Cluster Registry is as follows:
Version: 3
Total space (kbytes): 262120
Used space (kbytes): 2904
Available space (kbytes): 259216
ID: 635069277
Device/File Name: + VOTE
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 cdata] # / oracle/app/grid/11.2.0/bin/crsctl query css votedisk
# # STATE File Universal Id File Name Disk group
1. ONLINE 956b16ceaff14f4ebf37414725a67350 (/ dev/asm-diskb) [VOTE]
2. ONLINE adb3a38f36514f2bbfcaa798303df4a1 (/ dev/asm-diskc) [VOTE]
3. ONLINE aa9bfeef2ddd4f01bf212f8e020cd040 (/ dev/asm-diskd) [VOTE]
View the location and status of OCR backups
View automatic backups:
Ocrconfig-showbackup auto
View manual backups:
Ocrconfig-showbackup manual
The backups shown are all ocr backups automatically backed up by the system, and there is no manual backup prompted by the bottom PROT-25.
[root@rac1 cdata] # / oracle/app/grid/11.2.0/bin/ocrconfig-showbackup
Rac1 2019-09-05 07:37:35 / oracle/app/grid/11.2.0/cdata/rac-cluster/backup00.ocr
Rac1 2019-09-05 03:37:34 / oracle/app/grid/11.2.0/cdata/rac-cluster/backup01.ocr
Rac1 2019-09-04 16:44:33 / oracle/app/grid/11.2.0/cdata/rac-cluster/backup02.ocr
Rac1 2019-09-04 16:44:33 / oracle/app/grid/11.2.0/cdata/rac-cluster/day.ocr
Rac1 2019-09-04 16:44:33 / oracle/app/grid/11.2.0/cdata/rac-cluster/week.ocr
PROT-25: Manual backups for the Oracle Cluster Registry are not available
View the storage location of ASM SPFILE:
[root@rac1 cdata] # su-grid
[grid@rac1 ~] $asmcmd
ASMCMD > spget
+ VOTE/rac-cluster/asmparameterfile/registry.253.901344197
Start the operation
1. Do a good manual backup of ocr
[root@rac1 rac-cluster] # / oracle/app/grid/11.2.0/bin/ocrconfig-export / home/oracle/ocr.bak
two。 Back up the parameter files of ASM
Su-grid
Sqlplus / as sysasm
Create pfile='/home/grid/initasm.ora' from spfile
3.dd the disks in the original OCR disk group, rebuild the OCR disk group
[root@rac1 oracle] # dd if=/dev/zero of=/dev/asm-diskb bs=1024 count=1000
[root@rac1 oracle] # dd if=/dev/zero of=/dev/asm-diskc bs=1024 count=1000
[root@rac1 oracle] # dd if=/dev/zero of=/dev/asm-diskd bs=1024 count=1000
4. 2 nodes shut down the database and cluster
Node 1
[root@rac1 oracle] # / oracle/app/grid/11.2.0/bin/crsctl stop crs
Node 2
[root@rac2 ~] # / oracle/app/grid/11.2.0/bin/crsctl stop crs
5. Start the Node 1 GRID component in exclusive mode (NOCRS mode)-- execute only on Node 1
[root@rac1 oracle] # / oracle/app/grid/11.2.0/bin/crsctl start crs-excl-nocrs
6. View the log
Cluster alert log
[cssd (3150)] CRS-1601:CSSD Reconfiguration complete. Active nodes are rac1.
2019-09-05 04 purl 15 purl 10.314
[ctssd (3192)] CRS-2407:The new Cluster Time Synchronization Service reference node is host rac1.
2019-09-05 04 15 15 10 315
[ctssd (3192)] CRS-2401:The Cluster Time Synchronization Service started on host rac1.
2019-09-05 04 purl 1519. 173
[/ oracle/app/grid/11.2.0/bin/oraagent.bin (3071)] CRS-5011:Check of resource "+ ASM" failed: details at "(: CLSN00006:)" in "/ oracle/app/grid/11.2.0/log/rac1/agent/ohasd/oraagent_grid/oraagent_grid.log"
2019-09-05 04 purl 15 purl 21.828
[/ oracle/app/grid/11.2.0/bin/oraagent.bin (3071)] CRS-5011:Check of resource "+ ASM" failed: details at "(: CLSN00006:)" in "/ oracle/app/grid/11.2.0/log/rac1/agent/ohasd/oraagent_grid/oraagent_grid.log"
2019-09-05 04 1515 31.212
[/ oracle/app/grid/11.2.0/bin/oraagent.bin (3071)] CRS-5019:All OCR locations are on ASM disk groups [VOTE], and none of these disk groups are mounted. Details are at "(: CLSN00100:)" in "/ oracle/app/grid/11.2.0/log/rac1/agent/ohasd/oraagent_grid/oraagent_grid.log".
[grid@rac1 rac1] $crsctl stat res-t-init
NAME TARGET STATE SERVER STATE_DETAILS
Cluster Resources
Ora.asm
1 ONLINE INTERMEDIATE rac1 OCR not started
Ora.cluster_interconnect.haip
1 ONLINE ONLINE rac1
Ora.crf
1 OFFLINE OFFLINE
Ora.crsd
1 OFFLINE OFFLINE
Ora.cssd
1 ONLINE ONLINE rac1
Ora.cssdmonitor
1 ONLINE ONLINE rac1
Ora.ctssd
1 ONLINE ONLINE rac1 ACTIVE:0
Ora.diskmon
1 OFFLINE OFFLINE
Ora.evmd
1 OFFLINE OFFLINE
Ora.gipcd
1 ONLINE ONLINE rac1
Ora.gpnpd
1 ONLINE ONLINE rac1
Ora.mdnsd
1 ONLINE ONLINE rac1
7. Create a new diskgroup Node 1 operation
Su-grid
Sqlplus / as sysasm
Set line 200 pages 999
Col name for a15
Col compatibility for a15
Select inst_id,group_number,name,allocation_unit_size/1024/1024 au_mb,type,state,compatibility,database_compatibility from gv$asm_diskgroup order by 3,1
Create diskgroup VOTE
Normal redundancy
Disk
'/ dev/asm-diskb'
'/ dev/asm-diskc'
'/ dev/asm-diskd'
Attribute 'compatible.asm'='11.2.0.0.0'
8. Restore the OCR file and set up votedisk-Node 1 operation
Root execution
[root@rac1 ~] # / oracle/app/grid/11.2.0/bin/ocrconfig-import / home/oracle/ocr.bak-if you are using automatic backup, you need to replace-import with-restore here
[root@rac1 ~] # / oracle/app/grid/11.2.0/bin/ocrcheck
[root@rac1] # / oracle/app/grid/11.2.0/bin/crsctl replace votedisk + VOTE
Successful addition of voting disk 6b91880919e64fe3bfc01701f29256d1.
Successful addition of voting disk 2a0eef6d3ee64f10bfa2040621cef851.
Successful addition of voting disk a063e70967dd4fdcbf3b32e675c3246a.
Successfully replaced voting disk group with + VOTE.
CRS-4266: Voting file (s) successfully replaced
9. Restart the cluster
Node 1
[root@rac1] # / oracle/app/grid/11.2.0/bin/crsctl stop crs-f
[root@rac1 ~] # / oracle/app/grid/11.2.0/bin/crsctl start crs
Node 2
[root@rac2 ~] # / oracle/app/grid/11.2.0/bin/crsctl start crs
At this point, the study on "what is the backup and recovery method of ocr" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.