REPLICATION: Activating or Deactivating Replication

The REPLICATION function activates or deactivates replication for an Adabas database file. This function should be used with Adabas databases; it is not valid with Event Replicator Servers.

graphics/util_adadbs_replication.png

This document covers the following topics:


Essential Parameter

FILE: File Number

The file number of the database file for which replication is to be activated or deactivated. This parameter is required; there is no default.

Note:
Replication may not be turned on for an Adabas system file or for a ciphered file.

ON, OFF, MODIFY: Set Replication

One of the parameters ON, OFF, or MODIFY must be set. There is no default. Each parameter is described below:

  • ON turns replication on for the specified file.

  • OFF turns replication off for the specified file.

  • MODIFY allows you to modify one or more of the replication-related values (KEY, TARGET, DSBI) for a replicated file. The ACTIVATE and DEACTIVATE parameters allow you to change the replication status for a replicated file.

Optional Parameter

ACTIVATE: Activate Replication

The ACTIVATE parameter is only allowed when MODIFY is specified. It will activate replication for a file that has replication defined. Replication must already be inactive for the file.

DEACTIVATE: Deactivate Replication

The DEACTIVATE parameter is only allowed when MODIFY is specified. It will deactivate replication for a file that has replication defined. Replication must already be active for the file.

DSBI: Define Before Image

The DSBI parameter defines whether or not before images of data storage are collected for replication during the update of a record on a file. Following are rules for setting the DSBI parameter:

  • Possible values: "ON", "OFF"

  • The parameter is optional when "ON" or "MODIFY" is specified.

  • The parameter has a default value of "ON" when ADADBS REPLICATION ON is specified.

  • The parameter is not allowed when ADADBS REPLICATION OFF is specified.

For more information about how this parameter is used in Adabas database processing during replication, read Nucleus Processing in Event Replicator for Adabas Concepts.

INPARALLEL: Execute function in parallel

When INPARALLEL=YES is specified, the function may be executed even if other users are active on the file. Adabas performs the function while all application commands against the file are temporarily quiesced and suspended. The integrity of the file targeted by the ADADBS function is maintained.

With INPARALLEL=NO (the default), the function requires exclusive file control – that is, no applications can be executing against the file. Adabas refuses to execute the function (with response code 48) if other users are active on the file.

Caution:
If the REPLICATION function is performed with INPARALLEL=YES, the replication-related settings of the file may change in the middle of a replicated transaction. It may happen that some updates of the transaction get replicated while other updates do not get replicated. Updates performed in the course of a single command always get replicated either completely or not at all.

KEY: Define Primary Key

The KEY parameter defines the primary key for replication. Following are rules for setting the KEY parameter:

  • The parameter is optional when ON or MODIFY is specified.

  • The parameter is not allowed when OFF is specified.

  • The parameter may not be specified when OFF or NOKEY is specified.

Note:
The field name specified must be a descriptor on the file. Note that "descriptor" in this case is used generically, as the field may be a descriptor, subdescriptor, superdescriptor, etc.

NOKEY: Remove Primary Key Setting

The NOKEY parameter removes the primary key setting when MODIFY is specified. Following are rules for setting the NOKEY parameter:

  • The parameter is not allowed when OFF is specified.

  • The parameter is the default setting when ON is specified and neither NOKEY nor KEY is specified.

  • The parameter may not be specified when KEY is specified.

TARGET: Event Replicator Target ID

TARGET defines the Event Replicator target database ID. This parameter is required when ON is specified, is optional when MODIFY is specified, and is not allowed when OFF is specified.

Examples

ADADBS REPLICATION FILE=33,ON,TARGET=206,KEY=AA

or

ADADBS REPLICATION FILE=70,OFF

or

ADADBS REPLICATION FILE=71,MODIFY
ADADBS ACTIVATE

or

ADADBS REPLICATION FILE=72,MODIFY
ADADBS DEACTIVATE