solidDB Help : Configuring and administering : Configuring and administering HotStandby : HotStandby administration tasks : Switching server states : Switching a secondary server to a primary server
  
Switching a secondary server to a primary server
You can switch a secondary server to a PRIMARY state by issuing the command:
ADMIN COMMAND 'hotstandby switch primary';
When the hotstandby switch primary command is run, it starts a process to switch the state. If the switch process started successfully, the following message is displayed:
Started the process of switching the role to primary.
You can monitor the status of the switch by using the command hotstandby status switch.
If you run a commit after the hotstandby switch primary command, the commit fails with the error replicated transaction is aborted.
All transactions are terminated during the switch. However, administrative commands (ADMIN COMMAND) are not transactional commands and cannot be rolled back.
Note Administrative commands force the start of a new transaction if one is not already open. To avoid leaving an open transaction, or having a transaction start time be different from what you expected, execute a COMMIT WORK statement after administrative commands are run.
If a configuration error causes both servers to have the state of PRIMARY (for example, both are PRIMARY ALONE), you can use the command hotstandby switch secondary to switch one of the servers back to a SECONDARY state.
If the servers have the same data, normal operations on both servers are resumed.
If the servers do not have the same data, the primary server rejects the connect operation from the secondary server and displays the following message:
14525: HotStandby databases are not properly synchronized.
HotStandby replication is not started. In this case, a full copy of the primary database is required on the secondary server. First you must decide which database is correct.
Also, if the 14525 error occurs, the database states do not change. Both servers remain in the same state they were in before the command was run.
Go up to
Switching server states