oracle auto failover,dg设置auto failover

oracle auto failover,dg设置auto failoverdg 设置 autofailover 即设置 Fast StartFailove startfailove Instead itallowstheo

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  4 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

日记记录如下:

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后都需手动启动实例?

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/219657.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月17日 下午10:11
下一篇 2026年3月17日 下午10:11


相关推荐

  • kali linux用户名密码忘记了怎么办_kali用户名密码

    kali linux用户名密码忘记了怎么办_kali用户名密码1.修改账户的本质对于linux系统来说,一切皆文件,所以修改系统中的设置就是修改一些关联的文件。而修改用户名和密码就是修改系统的设置,只是这个设置比较特殊,这个设置修改起来也较为麻烦和危险。这里需要注意的事项:如果需要同时修改用户名和密码,那么请先修改密码,密码修改成功之后再修改用户名,这一点是一定需要注意的,这样可以避免修改用户名和密码后密码错误或密码正确也无法进入桌面的问题。2.修改密码对于linux系统熟练使用终端进行系统设置是非常方便的,简单来说就是设置步骤一部到位

    2026年1月15日
    4
  • linux查看硬盘smart信息_检查中ctl是检查什么

    linux查看硬盘smart信息_检查中ctl是检查什么知识介绍SMART是一种磁盘自我分析检测技术,早在90年代末就基本得到了普及每一块硬盘(包括IDE、SCSI)在运行的时候,都会将自身的若干参数记录下来这些参数包括型号、容量、温度、密度、扇区、寻道时间、传输、误码率等硬盘运行了几千小时后,很多内在的物理参数都会发生变化某一参数超过报警阈值,则说明硬盘接近损坏此时硬盘依然在工作,如果用户不理睬这个报警继续使用那么硬盘将变得非常不可靠,随时可能故障启用SMARTSMART是和主板BIOS上相应功能配合的要使用SMART,必须先进入到主板

    2022年10月8日
    4
  • 悄悄大撤退,Manus带走了哪些秘密?

    悄悄大撤退,Manus带走了哪些秘密?

    2026年3月15日
    3
  • sim卡 热拔插_sim卡热插拔是什么

    sim卡 热拔插_sim卡热插拔是什么1.device/prize/pri6737t_66_m0/ProjectConfig.mk关闭:MTK_SIM_HOT_SWAP=no打开:MTK_SIM_HOT_SWAP=yes2.ker

    2022年8月5日
    9
  • java protostuff 好处_Protostuff详解

    java protostuff 好处_Protostuff详解一、Protostuff介绍Protostuff是一个开源的、基于Java语言的序列化库,它内建支持向前向后兼容(模式演进)和验证功能。Protostuff支持的序列化格式包括:protobufprotostuffjsonsmile即二进制json,从protostuff-json模块中使用。Smile数据格式是由JacksonJSON库开发团队于2010年发布的数据格式,并在Jackson1…

    2022年6月7日
    31
  • J2EE开发架构大总结

    J2EE开发架构大总结nbsp 一些主流的架构模式 总结一下 nbsp 宏观上讲 我们采用了分层的架构 将软件分为如下的层次 nbsp 在具体的实现中 表现层可为 Struts JSF 等 业务层 访问层可为 JavaBean 或 EJB 等 资源层一般为数据库 nbsp 宏观上的层次就是这样 在具体现实中 有如下几种实现形式 1 轻量级实现 nbsp nbsp nbsp nbsp nbsp 表现层使用基于 MVC 的框架 比如 Struts 或 JSF nbsp nbsp nbsp nbsp nbsp nbsp 业务层使用 Ja

    2026年3月17日
    1

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号