dg设置auto  failover

auto failover即设置Fast-Start Failover

Enabling fast-start failover does not trigger a failover. Instead, it allows the observer to begin observing the primary and standby databases and initiate a fast-start failover should conditions warrant a failover.

配置步骤:

step 1:if  node >2节点

双节点环境会自动设置FastStartFailoverTarget  使得primary和standby 相互指向对方

If there is more than one standby database in the configuration, you must explicitly set the FastStartFailoverTarget property on the primary database and target standby database to point to each other for the purpose of defining which standby database will be the target of a fast-start failover

在primary显示定义primary和standby相互的依赖关系:

step 2: node>=2 节点

the observer and目标 standby database 均同primary断开连接超出FastStartFailoverThreshold 指定的延时时就启动fast-start failover

设置延时:EDIT CONFIGURATION SET PROPERTY FastStartFailoverThreshold = 45;默认是30秒

step 3:enable fast-start failover

ENABLE FAST_START FAILOVER

ORA-16651: 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 have not been met:

- The Data Guard configuration must be in MaxAvailability protection mode.

***edit configuration set protection mode as MaxAvailability

- The LogXptMode property for both the primary database and the Fast-Start Failover target standby database must be SYNC.

***edit database  orcl set property logxptmode=sync

***ORA-16789: missing standby redo logs

***alter database add standby logfile group 4 '/u01/app/oracle/oradata/orcl/redo04.log' size 50m;

***edit database  norcl set property logxptmode=sync

- The primary database and the Fast-Start Failover target standby database must both have flashback enabled.

***primary   alter database flashback on;

***standby   1、 alter database recover managed standby database 2、alter database flashback on;

- No valid target standby database was specified in the primary database"s FastStartFailoverTarget property prior to the attempt to enable Fast-Start Failover, and more than one standby database exists in the Data Guard configuration.

Step 4:  Start the Observer

DGMGRL> START OBSERVER;

连续的后台进程  dgmgrl中不会返回命令行提示符

ex:

DGMGRL> start observer

Observer started

如果要终止 则需在另一个client或session 中stop observer

step 5:验证

DGMGRL> show configuration

Configuration

Name:                mybroker

Enabled:             YES

Protection Mode:     MaxAvailability

Fast-Start Failover: ENABLED

Databases:

orcl  - Primary database

norcl - Physical standby database

- Fast-Start Failover target

Current status for "mybroker":

Warning: ORA-16607: one or more databases have failed

解决:

standby:recover managed standby database disconnect from session

disable fast_start failover

disable configuration

enable  configuration

enable fast_start failover

DGMGRL> show configuration

Configuration

Name:                mybroker

Enabled:             YES

Protection Mode:     MaxAvailability

Fast-Start Failover: ENABLED

Databases:

orcl  - Primary database

norcl - Physical standby database

- Fast-Start Failover target

Current status for "mybroker":

SUCCESS

DGMGRL>

step 5:测试

注意:observer要在standby主机上启用

disconnect 网卡后

DGMGRL> start observer

Observer started

06:44:52.25  Monday, October 18, 2010

Initiating fast-start failover to database "orcl"...

Performing failover NOW, please wait...

Operation requires shutdown of instance "orcl" on database "orcl"

Shutting down instance "orcl"...

ORA-01109: database not open

Database dismounted.

ORACLE instance shut down.

Operation requires startup of instance "orcl" on database "orcl"

Starting instance "orcl"...

Unable to connect to database

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Failed.

You are no longer connected to ORACLE

Please connect again.

Unable to start instance "orcl"

You must start instance "orcl" manually

Unable to failover

06:46:16.60  Monday, October 18, 2010

[W000 10/18 06:46:16.61] Failover failed. Quit observer.

Observer stopped

手动启动实例后日志文件输出完成failover

Failover succeeded. Primary database is now orcl.

--failover完了后原primary是no start状态

进入dgmgrl

DGMGRL> connect

Connected.

DGMGRL> show configuration

Configuration

Name:                mybroker

Enabled:             YES

Protection Mode:     MaxAvailability

Fast-Start Failover: ENABLED

Databases:

orcl  - Primary database

norcl - Physical standby database (disabled)

- Fast-Start Failover target

Current status for "mybroker":

Warning: ORA-16607: one or more databases have failed

DGMGRL> disable fast_start failover

Error: ORA-16652: Fast-Start Failover target standby database is disabled

Failed.

DGMGRL> enable database norcl

Error: ORA-16661: the standby database needs to be reinstated

Failed.

DGMGRL> help reinstate

Change a disabled database into a viable standby database

Syntax:

REINSTATE DATABASE ;

DGMGRL> reinstate database norcl

Reinstating database "norcl", please wait...

Error: ORA-16653: failed to reinstate database

Failed.

alert没有能帮助的信息 查看broker自己的日志

../admin/orcl/bdump/drcorcl.log

...

G 2010-10-18-07:04:30        0 2 0 NSV1: Failed to connect to remote database norcl. Error is ORA-01034

DG 2010-10-18-07:04:30        0 2 0 NSV1: Can't send OPEN message to DRCX. Network error is: ORA-01034.

DG 2010-10-18-07:04:30        0 2 0 NSV1: Ending metadata file transmission.

DG 2010-10-18-07:04:30        0 2 0 NSV1: Metadata Resync failed. Status = ORA-01034

DG 2010-10-18-07:04:30  2010000 4 732696705 DMON: Database norcl returned ORA-01034

ORA-01034: ORACLE not available

把这个实例启动到mount

状态仍然是:

SQL> select database_role from v$database;

DATABASE_ROLE

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

PRIMARY

运行 reinstate database 来将norcl flashback到failover的scn以将norcl改造成standby database.

DGMGRL> reinstate database norcl

Reinstating database "norcl", please wait...

Operation requires shutdown of instance "orcl" on database "norcl"

Shutting down instance "orcl"...

ORA-01109: database not open

Database dismounted.

ORACLE instance shut down.

Operation requires startup of instance "orcl" on database "norcl"

Starting instance "orcl"...

Unable to connect to database

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Failed.

You are no longer connected to ORACLE

Please connect again.

Unable to start instance "orcl"

You must start instance "orcl" manually

Reinstatement of database "norcl" failed

日记记录如下:

2697305 DMON: Entered rfm_release_chief_lock for EDIT_RES_PROP

DG 2010-10-18-07:09:19        0 2 0 NSV1: Failed to connect to remote database norcl. Error is ORA-12514

DG 2010-10-18-07:09:19        0 2 0 NSV1: Failed to send message to site norcl. Error code is ORA-12514.

手动启动norcl

DGMGRL>  reinstate database norcl

Reinstating database "norcl", please wait...

Reinstatement of database "norcl" succeeded

ORA-12514的解决

检查每个主机的监听文件 确认实例是否静态监听 且实例名要大写

重新转换一次角色

现在observer 是norcl

DGMGRL> show configuration

Configuration

Name:                mybroker

Enabled:             YES

Protection Mode:     MaxAvailability

Fast-Start Failover: ENABLED

Databases:

orcl  - Primary database

norcl - Physical standby database

- Fast-Start Failover target ---注意。。。

Current status for "mybroker":

.....

注:broker在dgmgrl cli关闭 启动instanc 因此需注意参数local_listener 及监听文件的设置

测试时 手动shutdown instance不会导致broker自动failover 会报:

ORA-16818: Fast-Start Failover suspended Cause: The primary database was intentionally shutdown. As a result, a Fast-Start Failover could not happen automatically.

Action: Start up the primary database. This effectively restores the ability to automatically do a Fast-Start Failover in the event of a failure of the primary database.

做switchover或reinstate后都需手动启动实例?

oracle auto failover,dg设置auto failover相关推荐

  1. oracle auto failover,Oracle学习之DATAGUARD(九) 自动Failover

    Oracle提供了一种快速自动故障转移架构(Fast-Start Failover).当主库发生故障时,FSFO会自动的将指定的从数据库转换成主数据库.此功能需要一个第三个的程序Observer来实现 ...

  2. kafka auto.offset.reset设置earliest从头开始消费

    auto.offset.reset设置为earliest spring:kafka:bootstrap-servers: 192.168.?.x:9092 consumer:auto-offset-r ...

  3. 转:VNX存储下,连接各平台主机的Failover Mode 设置的参数

    转载 转:VNX存储下,连接各平台主机(例如:AIX,HP-UX,LINUX,WINDOWS,SUN)的Failover Mode 都应该设置的参数 VNX上的Failover Mode就是1-4吧, ...

  4. Oracle HA篇+DG/ADG 基础知识

    说明:本文为面向Oracle (Active) Data Guard初学者的指导手册 标签:Oracle DG.Data Guard.Oracle ADG.Active Data Guard.ADG体 ...

  5. ORACLE 11G R2 DG BROKER 自动FAILE OVER

    也就是 FAST FAILE OVER http://docs.oracle.com/cd/B28359_01/server.111/b28295/cli.htm#BABEIIHD 7.6 Scena ...

  6. 一步一步搭建oracle 11gR2 rac+dg之环境准备(二)【转】

    一步一步在RHEL6.5+VMware Workstation 10上搭建 oracle 11gR2 rac + dg 之环境准备 (二) 一步一步搭建oracle 11gR2 rac+dg之环境准备 ...

  7. 一步一步搭建 oracle 11gR2 rac+dg之grid安装(四)

    一步一步在RHEL6.5+VMware Workstation 10上搭建 oracle 11gR2 rac + dg 之grid安装 (四) 本章目录结构: 这一步也比较重要,主要是安装ASM,如果 ...

  8. css margin属性 auto,css中margin:auto属性的使用方法

    css中margin:auto属性的使用方法 发布时间:2020-06-25 10:53:17 来源:亿速云 阅读:221 作者:Leah 今天就跟大家聊聊有关css中margin:auto属性的使用 ...

  9. Oracle ADG vs DG

    Oracle ADG vs DG 其实ADG的实验自己早已做过,就是不知道是DG的升级版而已. ADG: Active Data Guard DG: Data Guard What is the di ...

  10. auto头文件 qt_C++ auto 关键字的使用

    C++98 auto 早在C++98标准中就存在了auto关键字,那时的auto用于声明变量为自动变量,自动变量意为拥有自动的生命期,这是多余的,因为就算不使用auto声明,变量依旧拥有自动的生命期: ...

最新文章

  1. zerodivisionerror什么意思python-Python 中的 else详解
  2. 五小步让VS Code支持AngularJS智能提示
  3. ps里面的批处理教程
  4. 如何让两个输入框保持长度一直_投篮如何保持直线,为什么有些职业球员手臂弯曲投篮一直直...
  5. mybatis-嵌套(关联)查询/ N+1 / 延迟加载
  6. python优先队列使用_Python优先队列实现方法示例
  7. 微信小程序云函数传递数组_微信小程序云开发一周入门
  8. Silverlight socket组件
  9. idea 2017 常用图标
  10. 服装计算机辅助设计论文,计算机辅助高校服装设计论文
  11. oracle查看数据库文件大小
  12. spring 定时器_细数那些使用过的定时器
  13. 将oracle卸载干净 远离废弃oracle
  14. 2048游戏java教程_java版实现2048游戏功能
  15. 星辰变java镇东王府在哪里_星辰变中让人非常失望的四位高手,最后一位只动口不出手!...
  16. preg_match函数绕过
  17. SurroundDepth:自监督多摄像头环视深度估计
  18. Oracle 19C RAC 静默(silent)安装on RHEL7.x
  19. 从零开始使用composer开发php项目解决各种包调用
  20. 『天涯杂谈』 整理后的有关《新概念》英语的学习方法

热门文章

  1. 洛谷P3456 [POI2007]GRZ-Ridges and Valleys 题解
  2. 炎炎夏日送清凉,转发集赞得T恤,51CTO定制T恤免费送了
  3. mongoose视频教程
  4. 虚幻引擎(UE4) UMG 创建菜单
  5. 2020SCTF——PWN snake
  6. 交换机之三层交换原理
  7. 网络安全应急响应有哪些相关知识?
  8. 山东理工ACM【1009】Elevator
  9. 无纸化测评系统计算机考试试题,2015年9月计算机二级《Access》无纸化试卷(1)
  10. 关于GPIO的内部结构及编程步骤