-
Notifications
You must be signed in to change notification settings - Fork 3
Database Commit Modes
The replication environment supports three ways of committing data to the relational database:
In auto commit mode the SQL Server connection is switched into "auto commit" mode and every individual change to the database is automatically committed by SQL Server its self. No start transaction, commit or rollback instructions are ever issued by any code in the replication environment.
This mode can be selected via a command line option:
-commitmode=AUTOMATIC
Or by setting an environment variable:
REPLICATOR_COMMIT_MODE=AUTOMATIC
In batch commit mode the replicator process attempts to optimize the number of transactions by grouping multiple changes to the database into a lower number of transactions. The replicator will continue doing this until one of three events take place:
- A predetermined batch row count is reached.
- The replicator sleeps because the replication queue has become empty.
- A non-routine request (creating or deleting a table, etc.) is encountered.
In each of these cases the current transaction is committed to the database and a new transaction is started.
Batch commit mode mode is the default behavior, but may be explicitly selected via a command line option, as can the batch row count:
-commitmode=BATCH -commitbatch=1000
Or by setting environment variables:
REPLICATOR_COMMIT_MODE=BATCH
REPLICATOR_COMMIT_BATCH=1000
In manual commit mode, code in each specific operation explicitly starts a transaction, alters the database and then commits the transaction. This is the most "expensive" approach, but remains for compatibility with earlier code bases when this was the only mechanism available.
This mode can be selected via a command line option:
-commitmode=MANUAL
Or by setting an environment variable:
REPLICATOR_COMMIT_MODE=MANUAL
- Introduction
- Getting Started
- Downloading the Code
- Setting up the Environment
- Setting up SQL Server
- Setting the Database Connect String
- Database Commit Modes
- Setting up the Synergy OpenNET Server
- Setting up the FileService Server
- Configuring the Replicator Environment
- Running Multiple Instances
- Changing Field Data Types
- Excluding Fields From Replication
- Excluding Keys from Replication
- Building the Sample Environment
- Running the Sample Programs
- On Windows
- On UNIX or Linux
- On OpenVMS
- FileService