Youmay wish to run separate copies of the Message Agent to carry out these
differentphases. Youcan specify which phases a given Message Agent is to
executeon the Message Agent command line.
Specifyingwhich phases
toexecute Thecommand-line options are as follows:
Receive The-r command-line option instructs the Message Agent to
receivemessages while it is running. Tocause the Message Agent to shut
downafter receiving available messages, use the -b option in addition to
-r.
Scanlog The-I command-line option instructs the Message Agent to
scanthe transaction log into the stable queue while it is running.
Send The-s command-line option instructs the Message Agent to send
messageswhile it is running.
Multiplephases If none of -r,-I, or -s is specified, the Message
Agentexecutes all three phases. Otherwise,only the indicated phases are
executed.
Thereare several circumstances where you may wish to run multiple
MessageAgents.
Ensuringthe transaction log does not run out of space It is
importantthat the transaction log not be allowed to become full. Forthis
reason,you must scan the transaction log frequently enough to ensure
thatall entries required by SQL Remote are placed in the stable queue.
Therefore,you may want to run a Message Agent that scans the
transactionlog continuously, even if you are only receiving and sending
messagesin batch mode.
Mixingoperating systems If you wish to use a message link supported
underone operating system, you must use a Message Agent on that
platformto send and receive messages. Youcan do this, while running
thelog scanning on a UNIX machine, by running two copies of the
MessageAgent.
HowMessage Agents
aresynchronized Theoperations of two or more Message Agents are synchronized by a table
calledsr_marker. This table has a single column called marker, of data
typedatetime.
Whenthe Message Agent wants to wait for transactions to be scanned into
thestable queue, it updates sr_marker and waits for it to work its way
throughthe system. The column in sr_queue_state is also called marker,
andcontains the most recent marker to be scanned from the transaction log.
270