Contents IndexThe SQL Remote Database Extraction utility The Stop utility

User's Guide
   Part VI. SQL Anywhere Reference
     Chapter 39. SQL Anywhere Components
      The SQL Remote Message Agent

Syntax

     dbremote[switches] [ directory ]

Windows 3.x syntax

     dbremotw [switches] [ directory ]

Switch Description
-a Do not apply received transactions
-b Run in batch mode
-c"keyword=value; ..." Supply database connection parameters
-fminutes Receive message polling frequency (default is one minute)
-k Close window on completion
-llength Maximum message length
-msize Maximum amount of memory to be used by DBREMOTE for building messages.
-ofile Output messages to file
-p Do not purge messages
-r Receive only
-s Send only
-t Replicate all triggers
-u Process only backed up transactions
-v Verbose operation
-x Rename transaction log

Description

The messaging agent sends and applies messages for SQL Remote replication, and maintains the message tracking system to ensure message delivery.

The user ID in the Message Agent command line must have either REMOTE DBA or DBA authority.

The optional directory parameter specifies a directory in which old transaction logs are held, so that the Message Agent has access to events from before the current log was started.

A database can have only one instance of the messaging agent connecting to it at a time. However, multiple instances of the messaging agent can connect to a single database engine or server hosting multiple databases, provided only one messaging agent connects to one database.

For information on REMOTE DBA authority, see "The Message Agent and replication security". For information on log management in SQL Remote, see "Transaction log and backup management for SQL Remote".

Switches

-a Process the received messages (those in the inbox) without applying them to the database. Used together with -v (for verbose output) and -p (so the messages are not purged), this flag can help detect problems with incoming messages. Used without -p, this flag purges the inbox without applying the messages, which may be useful if a subscription is being restarted.

-b Run in batch mode. In this mode, the Message Agent processes incoming messages, scans the transaction log once and processes outgoing messages, and then stops.

-c "keyword=value; ..." Specify connection parameters. See "Database connection parameters" for a description of the connection parameters. If this option is not specified, the environment variable SQLCONNECT is used.

For example, the following statement runs DBREMOTE on a database file named C:\SQLANY50\SADEMO.DB, connecting with user ID dba and password sql:

     dbremote -c "uid=dba;pwd=sql;dbf=c:\sqlany50\sademo.db"

The DBREMOTE command-line utility must be run by a user with REMOTE DBA authority or DBA authority.

For information on REMOTE DBA authority, see "The Message Agent and replication security".

-f minutes Sets the frequency of incoming message checking when DBREMOTE is used in continuous mode (not batch mode). Specifies in minutes how often the source of messages is polled. Values greater than the SEND EVERY option specified in the GRANT REMOTE SQL statement cause DBREMOTE to check for incoming messages once after each send cycle. If this value is not set, a default polling frequency of one minute is used.

-k Close window on completion. This flag is valid for Windows and Windows NT only.

-l length Specifies the maximum length of message to be sent, in bytes. The default is 51200 (50K). Longer transactions are split into more than one message.

-m size Specifies a maximum amount of memory to be used by DBREMOTE for building messages. When the memory usage is exceeded, messages are flushed (before being full). The allowed size can be specified as n (in bytes), nK, or nM. The default is 2048K (2M).

This is provided for customers considering a single consolidated database for thousands of remote databases.

-o file Append output to a log file. Default is to send output to the screen.

-p Process the messages without purging them.

-r Receive messages only.

-s Send messages only.

-t All trigger actions are replicated. If you do use this switch, you must ensure that the trigger actions are not carried out twice at remote databases, once by the trigger being fired at the remote site, and once by the explicit application of the replicated actions from the consolidated database.

To ensure that trigger actions are not carried out twice, you can wrap an IF CURRENT REMOTE USER IS NULL ... END IF statement around the body of the triggers.

-u Process only transactions that have been backed up. This switch prevents DBREMOTE from processing transactions contained in the live transaction log. Transactions in the live, or active transaction log are not processed until that log file is backed up. Outgoing transactions and confirmation of incoming messages are only processed for those transactions that are not in the live transaction log.

-v Verbose output. This switch displays the SQL statements contained in the messages to the screen and, if the -o switch is used, to a log file.

-x Renames transaction log after it has been scanned for outgoing messages. Since replication can have the effect of backing up a database, in many cases this switch eliminates the need to run DBBACKUP on the remote computer (or renaming the transaction log when the engine is shut down).

Registry settings

SQL Remote uses several registry settings (in Windows 95 and NT) or initialization file settings (Windows 3.x and OS/2) to control aspects of message link behavior.

In the registry, the settings are stored in the Current User, under Software->Sybase->SQL Anywhere->Sybase SQL Anywhere 5.0->SQL Remote. In Windows 3.x and OS/2, they are stored in the SQLANY.INI initialization file.

  For a listing of registry settings, see "Message link control parameters".

Contents IndexThe SQL Remote Database Extraction utility The Stop utility