company logo

DBReplication - Administrate replication database

For supporting replication clients, the database must enable replication clients. Also the database may be disabled or re-enabled for replication. This can be done by calling DBReplication utility.

    DBReplication path [oper] [-T:ta_limit] [-q} [-h]

path - Path to the database location or ini-file. The database must be accessible on the local machine or as file share. In case of encoded database, the ini-file is required in order to provide the access key. The ini-file must contain a DATABASE section defining at least database and dictionary path (see example below). When using an external key file, KEY_FILE is required in addition.

oper - Enable or disable replication mode for database (enable: enable RDB mode, disable: disable RDB mode). After disabling the replication mode, the server will not provide replication services for this database anymore.

ta_limit - When enabling the replication mode for the database, one may define the maximum number of transactions stored for synchronization.

DBReplication ini-file [oper] [-T:ta_limit] [-q} [-h]

; minimum DATABASE section for an encoded database

[DATABASE]

DICTIONARY=...dict path...

DATABASE=...database path...

ACCESS_MODE=Write

SHARE=NO

Enable replication database

Enabling replication database mode will automatically create a backup file (a compressed version of the database) for being downloaded to client applications when starting up (opening the database the first time).

The backup file for download is either stored in the same directory as the database but with extension .ozi or in the directory defined in the BACKUP_FILES option variable (global or main section variable) when being defined.

Re-enable replication database

In order to reset the transaction number and to force clients to load an updated version for the database from the server, one may re-enable (DBReplication enable ...) a replication database. This causes increasing the version number of the replication database. Clients running with an older version of the replication database will automatically reload the database when starting an application. Moreover, the transaction-log is cleared, i.e. the number of update transactions is reset to 0.

Re-enabling the database allows also changing the maximum transaction number for the database.

Automatic re-anable database

When the transaction limit is exceeded, further transactions will fail and applications will not work properly. In order to avoid such situations, one may define re-enable options

    [RE_ENABLE]

    TIME=1:30

    LIMIT=10

The time value defines the time for the daily limit check by the server. When less than LIMIT percent of maximum transactions are available, the database will be re-enabled after closing all connections for the database still opened.

Notes:

Not yet implemented

Database maintenance

In some cases, for maintenance reasons the replication master base is used in a local environment. To ensure database consistency, the replication feature for the database is deactivated automatically, when opening the database in Update or Write mode.

When moving the maintained master database back to the server and re-starting the server, the server detects a deactivated version and will implicitly re-enabling the database before starting.

Disable replication mode

The replication mode is automatically reset, when running a replication database application with local database access. In this case, a confirmation for resetting the replication mode is requested. When not confirming, opening the database fails and the application stops. Otherwise, the replication mode is disabled and must be enabled later, again, in order to use the database in replication mode.

In order to disable replication mode explicitly, DBReplication must be called with operation disable.