User's Manual

You may wish to run separate copies of the Message Agent to carry out these
different phases. You can specify which phases a given Message Agent is to
execute on the Message Agent command line.
Specifying which phases
to execute
The command-line options are as follows:
Receive The -r command-line option instructs the Message Agent to
receive messages while it is running. To cause the Message Agent to shut
down after receiving available messages, use the -b option in addition to
-r.
Scan log The -I command-line option instructs the Message Agent to
scan the transaction log into the stable queue while it is running.
Send The -s command-line option instructs the Message Agent to send
messages while it is running.
Multiple phases If none of -r, -I, or -s is specified, the Message
Agent executes all three phases. Otherwise, only the indicated phases are
executed.
There are several circumstances where you may wish to run multiple
Message Agents.
Ensuring the transaction log does not run out of space It is
important that the transaction log not be allowed to become full. For this
reason, you must scan the transaction log frequently enough to ensure
that all entries required by SQL Remote are placed in the stable queue.
Therefore, you may want to run a Message Agent that scans the
transaction log continuously, even if you are only receiving and sending
messages in batch mode.
Mixing operating systems If you wish to use a message link supported
under one operating system, you must use a Message Agent on that
platform to send and receive messages. You can do this, while running
the log scanning on a UNIX machine, by running two copies of the
Message Agent.
How Message Agents
are synchronized
The operations of two or more Message Agents are synchronized by a table
called sr_marker. This table has a single column called marker, of data
type datetime.
When the Message Agent wants to wait for transactions to be scanned into
the stable queue, it updates sr_marker and waits for it to work its way
through the system. The column in sr_queue_state is also called marker,
and contains the most recent marker to be scanned from the transaction log.
270