DGbroker 빠른 장애 조치

11805 단어
1. 선결 조건
DGMGRL>  ENABLE FAST_START FAILOVER;
Error: ORA-16651: requirements not met for enabling fast-start failover
[oracle@vijay02 ~]$ oerr ora 16651
16651, 0000, "requirements not met for enabling fast-start failover"
// *Cause:  The attempt to enable fast-start failover could not be completed
//          because one or more requirements were not met:
//          - The Data Guard configuration must be in either MaxAvailability
//            or MaxPerformance protection mode.
//          - The LogXptMode property for both the primary database and
//            the fast-start failover target standby database must be
//            set to SYNC if the configuration protection mode is set to
//            MaxAvailability mode.
//          - The LogXptMode property for both the primary database and
//            the fast-start failover target standby database must be
//            set to ASYNC if the configuration protection mode is set to
//            MaxPerformance mode.
//          - The primary database and the fast-start failover target standby
//            database must both have flashback enabled.
//          - No valid target standby database was specified in the primary
//            database FastStartFailoverTarget property prior to the attempt
//            to enable fast-start failover, and more than one standby
//            database exists in the Data Guard configuration.
// *Action: Retry the command after correcting the issue:
//          - Set the Data Guard configuration to either MaxAvailability
//            or MaxPerformance protection mode.
//          - Ensure that the LogXptMode property for both the primary
//            database and the fast-start failover target standby database
//            are set to SYNC if the configuration protection mode is set to
//            MaxAvailability.
//          - Ensure that the LogXptMode property for both the primary
//            database and the fast-start failover target standby database
//            are set to ASYNC if the configuration protection mode is set to
//            MaxPerformance.
//          - Ensure that both the primary database and the fast-start failover
//            target standby database have flashback enabled.
//          - Set the primary database FastStartFailoverTarget property to
//            the DB_UNIQUE_NAME value of the desired target standby database
//            and the desired target standby database FastStartFailoverTarget
//            property to the DB_UNIQUE_NAME value of the primary database.

2. 매개변수 설정
a. 로그 동기화 전송 모드 설정
edit database patest set property logxptmode=sync;
edit database satest set property logxptmode=sync;

b. 보호 모드 설정(MaxAvailability or MaxPerformance)
edit configuration set protection mode as maxavailability;

c. 홈 라이브러리 고장난 전송 대상 설정
edit database patest set property FastStartFailoverTarget='satest';
edit database satest set property FastStartFailoverTarget='patest';

d. 기본 저장소 설정 번개
3. FAST_ 활성화START FAILOVER
ENABLE FAST_START FAILOVER;

상태 보기
DGMGRL> show configuration;

Configuration - dgc

  Protection Mode: MaxAvailability
  Databases:
    patest - Primary database
      Warning: ORA-16819: fast-start failover observer not started

    satest - (*) Physical standby database
      Warning: ORA-16819: fast-start failover observer not started

Fast-Start Failover: ENABLED    -- 

Configuration Status:
WARNING

감청기를 켜지 않아 경고가 나왔다.
4. 감청기 켜기(감청기는 독립된 서버에 설치할 수도 있고 특정한 노드에 설치할 수도 있다. 본 질문은 노드 라이브러리에 설치된다)
(독립된 서버에 설정하면 서버에 정적 감청과oracle 소프트웨어를 설정해야 합니다.)
DGMGRL> START OBSERVER
Observer started
.......

이상은 감청기를 켜는 명령입니다. 감청기가 켜지면 인터페이스가 돌아올 수 없습니다.
다음은 dgmgrl 상태 정보입니다.
DGMGRL> show configuration;

Configuration - dgc

  Protection Mode: MaxAvailability
  Databases:
    patest - Primary database
    satest - (*) Physical standby database

Fast-Start Failover: ENABLED    -- , , SUCCUSS

Configuration Status:
SUCCESS

5. 자동 장애 조치 시뮬레이션
a. 홈 라이브러리 고장 가정(shutdown abort)
b 모니터 알림
DGMGRL> START OBSERVER
Observer started

23:42:16.05  Wednesday, December 30, 2015
Initiating Fast-Start Failover to database "satest"...
Performing failover NOW, please wait...
Failover succeeded, new primary is "satest"
23:42:19.50  Wednesday, December 30, 2015

위의 프롬프트에서 자동으로 예비 라이브러리 기본 라이브러리가 활성화되었습니다.
c.dgmgrl 상태 정보
DGMGRL> show configuration;

Configuration - dgc

  Protection Mode: MaxAvailability
  Databases:
    satest - Primary database
      Warning: ORA-16817: unsynchronized fast-start failover configuration

    patest - (*) Physical standby database (disabled)
      ORA-16661: the standby database needs to be reinstated

Fast-Start Failover: ENABLED

Configuration Status:
WARNING

d. 고장 라이브러리를 복구하고 고장 라이브러리를 mount 상태로 시작합니다.
e. 감청기 자동 고장 라이브러리 복구 시작
DGMGRL> START OBSERVER
Observer started

23:42:16.05  Wednesday, December 30, 2015
Initiating Fast-Start Failover to database "satest"...
Performing failover NOW, please wait...
Failover succeeded, new primary is "satest"
23:42:19.50  Wednesday, December 30, 2015

23:46:02.03  Wednesday, December 30, 2015
Initiating reinstatement for database "patest"...
Reinstating database "patest", please wait...
Operation requires shutdown of instance "atest" on database "patest"
Shutting down instance "atest"...
Unable to connect to database
ORA-12545: Connect failed because target host or object does not exist

Failed.
Warning: You are no longer connected to ORACLE.

Please complete the following steps and reissue the REINSTATE command:
    shut down instance "atest" of database "patest"
    start up and mount instance "atest" of database "patest"

23:46:20.82  Wednesday, December 30, 2015

f. 모니터링 알림에 따라 고장난 라이브러리를 마운트에 다시 시작합니다.
g. dgmgrl 상태 정보 보기
DGMGRL> show configuration;

Configuration - dgc

  Protection Mode: MaxAvailability
  Databases:
    satest - Primary database
      Warning: ORA-16817: unsynchronized fast-start failover configuration

    patest - (*) Physical standby database (disabled)
      ORA-16661: the standby database needs to be reinstated

Fast-Start Failover: ENABLED

Configuration Status:
WARNING

h.reinstate 장애 라이브러리
DGMGRL> reinstate database patest;
Reinstating database "patest", please wait...
Reinstatement of database "patest" succeeded

i. dgmgrl 상태 정보 보기
DGMGRL> reinstate database patest;
Reinstating database "patest", please wait...
Reinstatement of database "patest" succeeded
DGMGRL> show configuration;

Configuration - dgc

  Protection Mode: MaxAvailability
  Databases:
    satest - Primary database
    patest - (*) Physical standby database

Fast-Start Failover: ENABLED

Configuration Status:
SUCCESS

상태가 복구되었습니다.
6. 자동 장애 조치 해제
DGMGRL> stop observer
Done.
DGMGRL> disable fast_start failover;
Disabled.

dgmgrl 상태 정보 보기
DGMGRL> show configuration;

Configuration - dgc

  Protection Mode: MaxAvailability
  Databases:
    satest - Primary database
    patest - Physical standby database

Fast-Start Failover: DISABLED    -- 

Configuration Status:
SUCCESS

 7.소결:
신속한 장애 조치 시 데이터 손실이 발생할 수 있으므로 주의하십시오!
감시기는 독립된 서버에 설치하는 것이 가장 좋다!

좋은 웹페이지 즐겨찾기