Export Import for backup and restore of "Oracle" OCR

Source: Internet
Author: User

backup and restore of OCR using Export import:

Before making adjustments to the cluster, such as adding or deleting nodes, you should make a backup of OCR , and use export to backup to the specified file.

Lab Environment:

OS:OEL5.6

RAC:10.2.0.1.0

(1) Turn off CRS for all nodes

Node 1:

[[email protected] crsd]# Crsctl stop CRS

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

Node 2:

[[email protected] ~]# Crsctl stop CRS

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

(2) Export the contents of OCR.

[[Email protected] crsd]# CD

[Email protected] ~]# Ocrconfig-export ocrexp.exp

(3) Start the CRS

Node One:

[[email protected] ~]# Crsctl start CRS

Attempting to start CRS stack

The CRS stack would be started shortly

Node Two:

[[email protected] ~]# Crsctl start CRS

Attempting to start CRS stack

The CRS stack would be started shortly

[Email protected] ~]# crs_stat-t

Name Type Target State Host

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

Ora .... B1.inst Application Online Online Rac1

Ora .... B2.inst Application Online Online RAC2

Ora. Racdb.db Application Online Online Rac1

Ora .... Sm1.asm Application Online Online Rac1

Ora .... C1.lsnr Application Online Online Rac1

ORA.RAC1.GSD Application Online Online Rac1

Ora.rac1.ons Application Online Online Rac1

ORA.RAC1.VIP Application Online Online Rac1

Ora .... Sm2.asm Application Online Online RAC2

Ora .... C2.lsnr Application Online Online RAC2

ORA.RAC2.GSD Application Online Online RAC2

Ora.rac2.ons Application Online Online RAC2

ORA.RAC2.VIP Application Online Online RAC2

(4) destroy the contents of OCR

[[email protected] ~]# dd If=/dev/zero of=/dev/raw/raw1 bs=1024 count=102400

102400+0 Records in

102400+0 Records out

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

(5) Check the cluster status,OCR Consistency:

[Email protected] ~]# crs_stat-t

Crs-0184:cannot communicate with the CRS daemon.

[Email protected] ~]# Ocrcheck

Prot-601:failed to initialize Ocrcheck

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

(6) Check consistency using the clufy tool in the clusterware installation package

[Email protected] cluvfy]#/runcluvfy.sh Comp Ocr-n All

Verifying OCR Integrity

Unable to retrieve nodelist from Oracle Clusterware.

Verification cannot proceed.

The check failed.

(7) use import to restore OCR content.

[Email protected] ~]# Ocrconfig-import ocrexp.exp

(8) re-check OCR

[Email protected] ~]# 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) Cluvfy tool Check

[Email protected] 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 configurations.

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.

There's no problem with the check.

(10) Close CRS

after the OCR has been destroyed, CRS has been abnormally stopped, but some processes are still alive, if not first shut down CRS, direct start CRS will not start.

Node One:

[[email protected] crsd]# Crsctl stop CRS

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

Node Two:

[[email protected] crsd]# Crsctl stop CRS

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

(10) Start the CRS

Node One:

[R[email protected] cluvfy]# crsctl start CRS

Attempting to start CRS stack

The CRS stack would be started shortly

Node Two:

[[email protected] ~]# Crsctl start CRS

Attempting to start CRS stack

The CRS stack would be started shortly

[Email protected] crsd]# crs_stat-t

Name Type Target State Host

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

Ora .... B1.inst Application Online Online Rac1

Ora .... B2.inst Application Online Online RAC2

Ora. Racdb.db Application Online Online RAC2

Ora .... Sm1.asm Application Online Online Rac1

Ora .... C1.lsnr Application Online Online Rac1

ORA.RAC1.GSD Application Online Online Rac1

Ora.rac1.ons Application Online Online Rac1

ORA.RAC1.VIP Application Online Online Rac1

Ora .... Sm2.asm Application Online Online RAC2

Ora .... C2.lsnr Application Online Online RAC2

ORA.RAC2.GSD Application Online Online RAC2

Ora.rac2.ons Application Online Online RAC2

ORA.RAC2.VIP Application Online Online RAC2

[[email protected] 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.