search
HomeDatabaseMysql Tutorial Oracle 11g Dataguard 物理备库配置(六)之broker fastfailover测试

Oracle11gDataguard物理备库配置系列文档Oracle11gDataguard物理备库配置(一)之duplicate创建Oracle11gDataguard物理备库配置(二)之ActiveDataguar..

Oracle 11g Dataguard 物理备库配置系列文档

Oracle 11g Dataguard 物理备库配置(五)之broker switchover测试

Oracle 11g Dataguard 物理备库配置(六)之broker fastfailover测试

 

Oracle 11g Dataguard 配置学习小结

 

本文采用Oracle 11g Dataguard broker fastfailover测试

Oracle 11g Dataguard fast failover配置,香港服务器租用,需要主备数据库开启闪回功能,闪回功能开启本文略过。
闪回开启需要启动到mount状态时,主备库的监听不要随意关闭。


1. dgmgrl查看主备库状态

$ dgmgrl sys/oracle

DGMGRL for Linux: Version 11.2.0.3.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.

欢迎使用 DGMGRL, 要获取有关信息请键入 "help"。
已连接。

DGMGRL> show configuration;

配置 - dgorcldb

  保护模式:        MaxPerformance
  数据库:
    orcl  - 主数据库
    slave - 物理备用数据库

快速启动故障转移: DISABLED

配置状态:
SUCCESS

#快速启动故障转移是不可用状态。

#查看故障转移情况,虚拟主机, DISABLED没有启用。

DGMGRL> show fast_start failover

快速启动故障转移: DISABLED

  阈值:             30 秒
  目标:             (无)
  观察程序:         (无)
  滞后限制:         30 秒
  关闭主数据库:     TRUE
  自动恢复:         TRUE

可配置的故障转移条件
  健康状况:
    Corrupted Controlfile          YES
    Corrupted Dictionary           YES
    Inaccessible Logfile            NO
    Stuck Archiver                  NO
    Datafile Offline               YES

  Oracle 错误条件:
    (无)


2. 启动快速启动故障转移

DGMGRL> enable fast_start failover; 


3. 启动快速启动故障转移observer观察程序

DGMGRL> start observer;

说明:start observer后,观察程序不会在后台运行,就在前台显示。
在实际使用过程中,需要单独在服务器上启动,在后台自动运行,不能关闭,否则主备库就无法自动监控运行状态。
就无法使用快速启动故障转移功能。


4. 在另一个窗口执行查看

$ dgmgrl sys/oracle

DGMGRL> show fast_start failover;

快速启动故障转移: ENABLED

  阈值:             30 秒
  目标:             slave
  观察程序:         master
  滞后限制:         45 秒
  关闭主数据库:     TRUE
  自动恢复:         TRUE

可配置的故障转移条件
  健康状况:
    Corrupted Controlfile          YES
    Corrupted Dictionary           YES
    Inaccessible Logfile            NO
    Stuck Archiver                  NO
    Datafile Offline               YES

  Oracle 错误条件:
    (无)


DGMGRL> show configuration

配置 - dgorcldb

  保护模式:        MaxPerformance
  数据库:
    slave - 主数据库
    orcl  - (*) 物理备用数据库

快速启动故障转移: ENABLED

配置状态:
SUCCESS


至此dgmgrl 配置的fast_start failover已经配置好,下面模拟故障切换过程。

可以通过shutdown abort模拟数据库意外垮掉的情况,香港空间,

注1:主库shutdown immediate是不会启动fast start failover功能的。

注2:oracle 11g dataguard fast start failover切换不需要主备库运行在最大可用模式。

 

5. 模拟测试主库意外垮掉

1)主库上:

$ sqlplus / as sysdba;
SQL> shutdown abort;

观察器显示日志:显示执行主备切换过程

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How Do I Drop or Modify an Existing View in MySQL?How Do I Drop or Modify an Existing View in MySQL?May 16, 2025 am 12:11 AM

TodropaviewinMySQL,use"DROPVIEWIFEXISTSview_name;"andtomodifyaview,use"CREATEORREPLACEVIEWview_nameASSELECT...".Whendroppingaview,considerdependenciesanduse"SHOWCREATEVIEWview_name;"tounderstanditsstructure.Whenmodifying

MySQL Views: Which design patterns can I use with it?MySQL Views: Which design patterns can I use with it?May 16, 2025 am 12:10 AM

MySQLViewscaneffectivelyutilizedesignpatternslikeAdapter,Decorator,Factory,andObserver.1)AdapterPatternadaptsdatafromdifferenttablesintoaunifiedview.2)DecoratorPatternenhancesdatawithcalculatedfields.3)FactoryPatterncreatesviewsthatproducedifferentda

What Are the Advantages of Using Views in MySQL?What Are the Advantages of Using Views in MySQL?May 16, 2025 am 12:09 AM

ViewsinMySQLarebeneficialforsimplifyingcomplexqueries,enhancingsecurity,ensuringdataconsistency,andoptimizingperformance.1)Theysimplifycomplexqueriesbyencapsulatingthemintoreusableviews.2)Viewsenhancesecuritybycontrollingdataaccess.3)Theyensuredataco

How Can I Create a Simple View in MySQL?How Can I Create a Simple View in MySQL?May 16, 2025 am 12:08 AM

TocreateasimpleviewinMySQL,usetheCREATEVIEWstatement.1)DefinetheviewwithCREATEVIEWview_nameAS.2)SpecifytheSELECTstatementtoretrievedesireddata.3)Usetheviewlikeatableforqueries.Viewssimplifydataaccessandenhancesecurity,butconsiderperformance,updatabil

MySQL Create User Statement: Examples and Common ErrorsMySQL Create User Statement: Examples and Common ErrorsMay 16, 2025 am 12:04 AM

TocreateusersinMySQL,usetheCREATEUSERstatement.1)Foralocaluser:CREATEUSER'localuser'@'localhost'IDENTIFIEDBY'securepassword';2)Foraremoteuser:CREATEUSER'remoteuser'@'%'IDENTIFIEDBY'strongpassword';3)Forauserwithaspecifichost:CREATEUSER'specificuser'@

What Are the Limitations of Using Views in MySQL?What Are the Limitations of Using Views in MySQL?May 14, 2025 am 12:10 AM

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

Securing Your MySQL Database: Adding Users and Granting PrivilegesSecuring Your MySQL Database: Adding Users and Granting PrivilegesMay 14, 2025 am 12:09 AM

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

What Factors Influence the Number of Triggers I Can Use in MySQL?What Factors Influence the Number of Triggers I Can Use in MySQL?May 14, 2025 am 12:08 AM

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Clair Obscur: Expedition 33 - How To Get Perfect Chroma Catalysts
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools