When a server is reconnected to a network with two servers following a failure of any kind, the program ONLINE can be used to reconcile the data on the two servers.
In the worst situation, neither server has failed. They have simply become disconnected, with some workstations continuing to operate on one, and others on the second. ONLINE reconciles the two databases. It is always successful in the sense that the databases will be the same for all records that have been updated during the session, but there are circumstances when this still does not give the required result.
ONLINE works by comparing the transaction logs on each server against the database on the other. It can therefore only be used where transaction logging is enabled. ONLINE performs the following operations:
Records inserted on one server are copied to the other if they are either not present on the other or the matching record has an earlier last update time
Records amended on one server are copied to the other if they are either not present on the other or the matching record has an earlier last update time
Records deleted on one server cause a deletion on the other if they are present on the other and the matching record has an earlier last update time
Records match if they have the same primary key.
For this reconciliation to be useful, the application must conform to guidelines discussed in Design Constraints with Multiple Server Resilience.
To use ONLINE run it against your local database specifying the number of the server to be used for reconciliation with the -server n command tail. For example:
online -db salesord -server 1See Command Tails for other command tails that can be used with ONLINE.