Rebuilding queues from off-line database logs

This task is used to recover data from off-line database logs. You use the rebuild queues command only after you have restarted the Replication Server in standalone mode. For details on standalone mode, see “Using standalone mode”. Executing rebuild queues in standalone mode puts Replication Server in recovery mode.

In recovery mode, the Replication Server allows only RepAgents in recovery mode to connect. If a RepAgent that is not in recovery mode attempts to connect, Replication Server rejects it with following error message:

Rep Agent not in recovery mode

If you use a script that automatically restarts RepAgent and connects it to the Replication Server, you must start RepAgent using the for_recovery option. RepAgents are not allowed to connect in normal mode.

Figure 7-2 illustrates the progression from normal mode to standalone mode to recovery mode using the rebuild queues command.

Figure 7-2: Entering recovery mode with the rebuild queues command

Figure 7-2 illustrates the progression from normal mode to standalone mode to recovery mode with the rebuild queues command. As shown in the figure, from the normal mode, the dash M flag is use to restart the Replication Server in standalone mode. To enter the recovery mode, rebuild queues command is used. This also shows RepAgent attempt to connect to the Replication Server in recovery mode.

Using standalone mode

To start Replication Server in standalone mode, use the -M flag. Standalone mode is useful for looking at the state of Replication Server because the state is static. Standalone mode allows you to review the contents of the stable queues because no messages are being written to or read from the queues.

Standalone mode differs from the Replication Server normal mode in the following ways: