[Oracle] export and import of OCR backup and recovery

Source: Internet
Author: User

[Oracle] export and import of OCR backup and recovery

Back up and restore OCR using exported import:

Before adjusting the cluster, for example, adding or deleting nodes, you should back up OCR once. You can use export to back up to the specified file.

Lab environment:

OS: OEL5.6

RAC: 10.2.0.1.0

(1) Disable CRS for all nodes

Node 1:

[Root @ rac1 crsd] # crsctl stop crs

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

Node 2:

[Root @ rac2 ~] # Crsctl stop crs

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

(2) Export the OCR content.

[Root @ rac1 crsd] # cd

[Root @ rac1 ~] # Ocrconfig-export ocrexp. exp

(3) Start CRS

Node 1:

[Root @ rac1 ~] # Crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly

Node 2:

[Root @ rac2 ~] # Crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly

[Root @ rac2 ~] # Crs_stat-t

Name Type Target State Host

------------------------------------------------------------

Ora... B1.inst application ONLINE rac1

Ora... B2.inst application ONLINE rac2

Ora. RACDB. db application ONLINE rac1

Ora... SM1.asm application ONLINE rac1

Ora... C1.lsnr application ONLINE rac1

Ora. rac1.gsd application ONLINE rac1

Ora. rac1.ons application ONLINE rac1

Ora. rac1.vip application ONLINE rac1

Ora... SM2.asm application ONLINE rac2

Ora... C2.lsnr application ONLINE rac2

Ora. rac2.gsd application ONLINE rac2

Ora. rac2.ons application ONLINE rac2

Ora. rac2.vip application ONLINE rac2

(4) Damage content in OCR

[Root @ rac2 ~] # Dd if =/dev/zero of =/dev/raw/raw1 bs = 1024 count = 102400

102400 + 0 records in

102400 + 0 records out

104857600 bytes (105 MB) copied, 41.7897 seconds, 2.5 MB/s

(5) Check the cluster status and OCR consistency:

[Root @ rac2 ~] # Crs_stat-t

CRS-0184: Cannot communicate with the CRS daemon.

[Root @ rac2 ~] # Ocrcheck

PROT-601: Failed to initialize ocrcheck

The cluster has been suspended and the consistency cannot be checked.

(6) use the clufy tool in the Clusterware installation package to check consistency

[Root @ rac1 cluvfy] #./runcluvfy. sh comp ocr-n all

Verifying OCR integrity

Unable to retrieve nodelist from Oracle clusterware.

Verification cannot proceed.

Check failed.

(7) use import to restore ocr content.

[Root @ rac1 ~] # Ocrconfig-import ocrexp. exp

(8) Check OCR again

[Root @ rac1 ~] # Ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 2

Total space (kbytes): 104344

Used space (kbytes): 3820

Available space (kbytes): 100524

ID: 1731255225

Device/File Name:/dev/raw/raw1

Device/File integrity check succeeded

Device/File not configured

Cluster registry integrity check succeeded

(9) Check the cluvfy Tool

[Root @ rac1 cluvfy] #./runcluvfy. sh comp ocr-n all

Verifying OCR integrity

Checking OCR integrity...

Checking the absence of a non-clustered configuration...

All nodes free of non-clustered, local-only deployments.

Uniqueness check for OCR device passed.

Checking the version of OCR...

OCR of correct Version "2" exists.

Checking data integrity of OCR...

Data integrity check for OCR passed.

OCR integrity check passed.

Verification of OCR integrity was successful.

Check is OK.

(10) Disable CRS

After the OCR is damaged, the CRS has stopped abnormally, but some processes are still alive. If you do not close the CRS first, directly starting the CRS will fail.

Node 1:

[Root @ rac1 crsd] # crsctl stop crs

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

Node 2:

[Root @ rac2 crsd] # crsctl stop crs

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

(10) Start CRS

Node 1:

[Root @ rac1 cluvfy] # crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly

Node 2:

[Root @ rac2 ~] # Crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly

[Root @ rac2 crsd] # crs_stat-t

Name Type Target State Host

------------------------------------------------------------

Ora... B1.inst application ONLINE rac1

Ora... B2.inst application ONLINE rac2

Ora. RACDB. db application ONLINE rac2

Ora... SM1.asm application ONLINE rac1

Ora... C1.lsnr application ONLINE rac1

Ora. rac1.gsd application ONLINE rac1

Ora. rac1.ons application ONLINE rac1

Ora. rac1.vip application ONLINE rac1

Ora... SM2.asm application ONLINE rac2

Ora... C2.lsnr application ONLINE rac2

Ora. rac2.gsd application ONLINE rac2

Ora. rac2.ons application ONLINE rac2

Ora. rac2.vip application ONLINE rac2

[Root @ rac2 crsd] # crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.