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
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:
No incoming connections are accepted. If any RepAgent or Replication Server attempts to connect to a Replication Server in standalone mode, the message “Replication Server is in Standalone Mode” is raised.
No outgoing connections are started. A Replication Server in standalone mode does not attempt to connect to other Replication Servers.
No DSI threads are started, even if there are messages in the DSI queues that have not been applied.
No Distributor (DIST) threads are started. A DIST thread reads messages from the inbound queues, performs subscription resolution, and writes messages to the outbound queues.