Difference between failover and switchover

We often get asked what is the difference between switchover and failover? The easiest way to understand is that:

Switchover – This is done when both primary and standby databases are available. It is pre-planned.

Failover – This is done when the primary database is NO longer available (ie in a Disaster). It is not pre-planned.

A switchover (or graceful switchover) is a planned role reversal between the primary and the standby databases. This is used when there is a planned outage on the primary database or primary server and you do not want to have extended downtime on the primary database. The switchover allows you to  switch the roles of the databases so that the standby databases now becomes a primary databases and all your users and applications can continue operations on the “new” primary database (on the standby server). During the switchover operation there is a small outage. How long the outage lasts, depends on a number of factors including the network, the number and sizes of the redo logs. The switchover operation happens on both the primary and standby database.

A failover operation is what happens when the primary database is no longer available. The failover operation only happens on the standby database. The failover operation activates the standby database and turns this into a primary database. This process cannot be reversed so the decision to failover should be carefully made. The failover process is initiated during a real disaster or severe outage.

Automatic Failover

Automatic failover is where the software determines when the standby database should be activated to become the new primary database. There are numerous conditions that can occur (ie: network glitches/outages) in any system which theoretically could disrupt communications between the primary and standby sites. Because of the importance of this decision and the number of variances, we believe it is best not to automate this process but to leave it in the hands of a human.

More information on what happens during a failover: http://blog.dbvisit.com/activating-standby-database-failover/

Dbvisit and failover/switchover

In Dbvisit both failover and switchover is possible. The Dbvisit commands are as follows:

Failover:

dbv_oraStartStop activate orcl1

(where orcl1 is the name of the database)

This command is run on the standby server. Now the standby database has been activated and is now the new primary database.

Switchover:

dbv_oraStartStop switchover orcl1

(where orcl1 is the name of the database)

This command is run on both the primary and standby servers. The primary database will become the standby database, and the standby database becomes the primary database. Dbvisit will continue to operate to keep the new standby database up to date from the new primary database. No configuration changes need to be made.

About Arjen Visser


As the Founder and Technical Director of Dbvisit Arjen is passionate about helping to create software that is highly effective and simple to use. With over 20 years of database experience in the IT industry, his technical expertise and extensive IT knowledge covers a broad range of industries and areas.