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.

你可能感兴趣的:(oracle,failover,区别)