solidDB Help : Configuring and administering : Configuring and administering HotStandby : HotStandby administration tasks : Switching server states
  
Switching server states
The HotStandby (HSB) component requires that the server state is switched, when necessary, either automatically or manually by a user.
In production use, the server state is chosen by using automatic state switching, that is, by performing failovers. The automatic state switching can be the responsibility of, for example, the solidDB High Availability Controller (HAC).
Switchover means reversing the roles of the primary and secondary servers when they are running. Switchover can be used for various maintenance purposes.
Failover is the action by secondary server for taking on the role of the primary server when the primary server fails.
The roles of the servers can be reversed by issuing the following command at the secondary server:
ADMIN COMMAND 'hotstandby switch primary';
or, at the primary server:
ADMIN COMMAND 'hotstandby switch secondary';
The switch commands can be used regardless of whether the two servers are connected. If the servers are connected, the states are reversed; the old secondary server becomes the new primary server, and the old primary server becomes the new secondary server. If the servers are not connected, the old secondary server becomes the new primary server, and the state of the other server is unchanged.
The following diagram shows what happens if you run the command hsb switch secondary or hsb switch primary when the servers are connected. The command hsb switch primary can be run only on a server that is in a SECONDARY state (for example, SECONDARY ACTIVE), while the command hsb switch secondary can only be used on a server that is in a PRIMARY state (for example, PRIMARY ACTIVE).
The diagram is described in the surrounding text
When you run the command hotstandby switch primary to switch the secondary server (Server #2) to the primary server (Server #1), the servers switch states; the old primary server (Server #1) becomes the new secondary server and the old secondary server (Server #2) becomes the new primary server.
If the old secondary server cannot connect to the other server, an error is returned and both servers switch to SECONDARY ALONE. Even if the HotStandby.AutoPrimaryAlone configuration parameter is set to yes, the new primary server switches to SECONDARY ALONE, not PRIMARY ALONE.
See
Switching a secondary server to a primary server
Switching a primary server to a secondary server
Performing failovers
Running the new primary server in PRIMARY ALONE state
Bringing the secondary server back online
Go up to
HotStandby administration tasks