Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Oracle 11g dg broker turns on fast-start failover automatic failover

Shulou Source: shulou.com Published: 2022-06-01 01:56:33 10月04日 Update

one。 First of all, make sure that the flashback database function and forced archiving of the master-slave database are turned on, as follows: yes SQL > select flashback_on,force_logging from vault database; FLASHBACK_ON FOR-NO NO 1.1 enable flashback database SQL > ALTER SYSTEM SET db_recovery_file_dest_size=3g SCOPE=BOTH; System altered. SQL > alter system set db_recovery_file_dest='/data/u01/app/oracle/fast_recovery_area'; System altered. SQL > alter database flashback on; Database altered. 1.2 enable mandatory archiving SQL > alter database force logging; Database altered. SQL > select flashback_on,force_logging from vested database; FLASHBACK_ON FOR-YES YES

Open fast-start failover 2.1.Open fast-start failover [oracle@beijing-fuli-hadoop-02] $dgmgrl sys/ oracle@db2 DGMGRL for Linux: Version 11.2.0.4.0-64bit Production Copyright (c) 2000, 2009, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. Connected. DGMGRL > enable fast_start failover; Enabled. 2.2. Check the configuration status and find a warning. Alarm because observer is not started! DGMGRL > show configuration Configuration-dbha_c Protection Mode: MaxPerformance Databases: db2-Primary database Warning: ORA-16819: fast-start failover observer not started db1-(*) Physical standby database Warning: ORA-16819: fast-start failover observer not started Fast-Start Failover: ENABLED Configuration Status: WARNING 2.3.Open the startup viewer (observer): DGMGRL > show configuration Configuration-dbha_c Protection Mode: MaxPerformance Databases: db2-Primary database db1-(*) Physical standby database Fast-Start Failover: ENABLED Configuration Status: SUCCESS will always occupy the session window due to observer startup Therefore, it is recommended to write a script and hang it in the background. Here, we create a script on the repository as follows: create a script called observer.sql, put the following command in it, and then execute the script. Nohup dgmgrl sys/oracle@db2 "start observer" > > observer.log 2 > & 1 & 3: verify automatic switching: db2 main library: SQL > select DATABASE_ROLE,OPEN_MODE from v$database

DATABASE_ROLE OPEN_MODE-- PRIMARY READ WRITE db1 is standby SQL > select DATABASE_ROLE,OPEN_MODE from vault database; DATABASE_ROLE OPEN_MODE-- PHYSICAL STANDBY READ ONLY WITH APPLY db2 main library simulates abnormal shutdown SQL > shu abort ORACLE instance shut down. Check the status of db1 again: SQL > select DATABASE_ROLE,OPEN_MODE from vested database; DATABASE_ROLE OPEN_MODE-- PRIMARY READ WRITE

Tags: Script data database status guarantee force switch master-slave again function background startup meeting command suggestion face put in observe configure verify fault Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Technology NVidia Shulou Tech Info Linux