oracle failover 区别,Oracle中Failover和Switchover的区别

1. 什么是Failover?

2.什么是Switchover?3. 配置Connect Time Failover4. 配置Transparent Application Failover

1. 什么是Failover?

A failover is when the primary database is unavailable. Failover is performed only in the event of a catastrophic failure of the primary database, and the failover results in a transition of a standby database to the primary role. The database administrator can configure Data Guard to ensure no data loss.

2. 什么是Switchover?

A switchover is a role reversal between the primary database and one of its standby databases. A switchover ensures no data loss. This is typically done for planned maintenance of the primary system. During a switchover, the primary database transitions to a standby role, and the standby database transitions to the primary role. The transition occurs without having to re-create either database.

3. 配置Connect Time Failover

Connect time failover will reroute incoming connections to the instance that has just become primary. This type of failover should work in cases where the old primary node is down, old primary network is down, old primary listener is down,

or old primary instance is now the standby.

When the old primary network is down, failover functionality is built into the basic layer of Oracle Net. We simply tcp timeout and fail to the next host in the list.

DBname_alias =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = primary_host)(PORT = 1521))

(ADDRESS = (PROTOCOL = TCP)(HOST = standby_host)(PORT = 1521))

)

(CONNECT_DATA =

(INSTANCE_NAME=DBname_primary)

(SERVICE_NAME = DBname)

)

)

4. 配置Transparent Application Failover

For application failover, all existing connections from the current primary must failover to the new primary. One of the biggest obstacles to overcome is the lag time from when the standby database becomes the primary database. Client connections should continue to retry the failover until the standby has been opened as the new production.

This could be done by having an alias similar to the following:

DBname_TAF=

(DESCRIPTION=

(address_list=

(load_balance=off)

(failover=on)

(ADDRESS = (PROTOCOL = TCP)(HOST = primary_host)(PORT = 1521))

(ADDRESS = (PROTOCOL = TCP)(HOST = standby_host)(PORT = 1521))

)

(CONNECT_DATA=

(instance_name=DBname_primary)

(SERVICE_NAME=DBname)

(FAILOVER_MODE=

(TYPE=session)

(METHOD=BASIC)

(RETRIES=200)

(DELAY = 3)))

)

TAF will try to failover to the second node in the address_list. If it cannot connect, it will wait 3 seconds and retry again. It will retry a total of 200 times. This delay will provide the DBA with enough time to perform a switchover or activate the standby as the new production.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值