REPSERVER - Replicating the Data
The actual replication is performed by running the
REPSERVERprogram. This program will handle the replication for one subscription. This program connects to source database as
REP_SOURCE_USERand to the target database as
MIMSYNCis typically used before replication is first set-up, or has been halted for some reason, to make sure that source and target tables have the same contents. After the synchronization, the replication functionality ensures that the tables remain identical.
Syntaxusage: repserver [options (except -t)] [source_database] [subscription] repserver -t [--spassword=password] [source_database] [subscription] options: -l logfile, --logfile=logfile Logfile, if omitted standard output -e, --exit Exit option -t, --stop Terminate replication server -? --help Display this help and exit --verbose Turn on verbose output --version Output version information and exit --spassword=password REP_SOURCE_USER source password --tpassword=password REP_TARGET_USER target password
If any required parameter is omitted, the program will prompt for these values.
REPSERVERprogram will read the log tables for all tables in the subscription and perform the same operations on the target database. After each commit on the target database the data in the log tables will be deleted. Once all operations have been done the program will sleep for the rest of the interval specified for the subscription. If the interval for the subscription is set to 0 the program will poll the log tables for any data continuously.
Start the Replication
To start the replication for a subscription the
REPSERVERprogram can be started with following command line arguments:repserver [--spassword=password] [--tpassword=password] [--logfile=logfile]
[--exit] database [subscription-name]
Note: The REPSERVER program should normally be run as a detached process on VMS, or as a background process on Unix.
Stop the Replication
To stop the replication the
REPSERVERprogram should be run with the following optionsREPSERVER -t [--spassword=password] database subscription-name
This will set the stopping flag in the replication dictionary to `YES' for the specified subscription. The
REPSERVERprogram will periodically look at this flag, when not active. This means that it can take some time before the replication is stopped.
Most Mimer SQL errors are considered fatal for
REPSERVER, with the exception of the following three:
- Error -10101, INSERT operation invalid because the resulting table will contain a primary key duplicate
- Error -10110, unique constraint violation
- Error 100, record for update or delete not found
These errors will only result in a warning. This is to make replication possible even if the target table is not identical to the source table.
REPSERVERgets a transaction conflict, it will try to execute the transaction once more. If the second attempt fails
REPSERVERconsiders this a fatal error.
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40