ADADBS Utility Replication Functions

#### Search Results

Search

# ADADBS Utility Replication Functions

Two separate ADADBS utility functions impact replication processing for an Adabas database or for an Event Replicator Server:

- The REPLICATION function controls whether replication is activated for an Adabas database file. This function should be used for Adabas database files, and not with Event Replicator Server files.

- The REPTOR function to activate and deactivate specific DBID, destination, and subscription definitions in the Replicator system file (Event Replicator Server) and to open or close destination and IQUEUE definitions in the Replicator system file.

In addition, the ADADBS MODFCB function includes a parameter that can be specified to indicate whether an Adabas database file may be updated only by the Event Replicator Server as part of Adabas-to-Adabas replication or by other means as well.

## ADADBS MODFCB Parameters

The RPLUPDATEONLY parameter can be used in the ADADBS MODFCB function to indicate whether an Adabas database file may be updated only by the Event Replicator Server as part of Adabas-to-Adabas replication or by other means as well. This parameter is optional. Valid values are "YES" or "NO". A value of "YES" indicates that the file can only be updated via Event Replicator processing; a value of NO indicates that the file can be updated by any normal means, including Event Replicator processing. There is no default; if no value is specified for the RPLUPDATEONLY parameter in the ADADBS MODFCB function, the value used previously for the file is used.

## ADADBS OPERCOM Parameters

This section covers the following topics:

- DRPLSTAT

- RPLCHECK

### DRPLSTAT

Use DRPLSTAT to display the replication-related statistics for an Adabas database (with replication turned on) or for an Event Replicator Server. When issued against an Adabas database (with replication turned on), the statistics listed include:

- The total number of replication transactions completely processed.

- The current number of pending replicated transactions (transactions that have been committed, but not yet processed)

- The current number of incomplete transactions that will be replicated (but are not yet committed).

When issued against an Event Replicator Server, the statistics related to destinations, global values, and subscriptions in the database are listed. Replay Utility (ADARPL) statistics are also included.

### RPLCHECK

The RPLCHECK command can be used in the ADADBS OPERCOM function to perform the replication cross-check function for all active databases known (defined in one or more subscriptions) to the Event Replicator Server. When this command is run using the ADADBS OPERCOM function, the information about the cross-check function is printed to the ADADBS DDDRUCK data set. The information printed by ADADBS is the same as the information printed by the Event Replicator Server during the cross-check process initiated by the RPLCHECK operator command.

Note
Not valid for use with an Adabas nucleus; only valid for use against an Event Replicator Server. If this command is issued against a database that is not an Event Replicator Server, error messages result.

## ADADBS REPLICATION Function

The ADADBS 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.

This section covers the following topics:

- Required Parameters

- Optional Parameters

- Examples

### Required Parameters

> FILE: Database File

>   FILE is 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.

>     Note
>     Replication may not be turned on for a file that allows spanned data storage records (i.e. a file compressed with the ADACMP COMPRESS option SPAN).

>   - 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 Parameters

> 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 Detailed Adabas Nucleus Processing.

> 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

## ADADBS REPTOR Function

The ADADBS REPTOR function provides activation and deactivation control of Event Replicator resources. This function should be used with Event Replicator Servers; it is not valid with other Adabas databases.

This section covers the following topics:

- Required Parameters

- Optional Parameters

- Examples

### Required Parameters

> ACTIVATE | DEACTIVATE | OPEN | CLOSE: Event Replicator Server request

>   One of the parameters, ACTIVATE, DEACTIVATE, OPEN, or CLOSE must be set. There is no default. Each parameter is described below:

>   - ACTIVATE requests activation for the specified file, database ID, destination, or subscription.

>   - DEACTIVATE requests deactivation for the specified file, database ID, destination, or subscription.

>   - OPEN requests that an unavailable destination or input queue be opened. When this parameter is specified, either the DESTINATION or IQUEUE parameter must be specified.

>   - CLOSE requests that an available destination or input queue be closed. When this parameter is specified, either the DESTINATION or IQUEUE parameter must be specified.

### Optional Parameters

> DBID: Replicated DBID

>   The DBID parameter, when specified without the FILE parameter, will activate replication for any inactive files or deactivate replication for any active files for a given DBID. When specified with the FILE parameter, the DBID parameter identifies the database in which the file specified by the FILE parameter resides.

>   The DBID parameter is mutually exclusive with the DESTINATION, IQUEUE, and SUBSCRIPTION parameters.

> DESTINATION: Replication Destination

>   The DESTINATION parameter can only be specified when the ACTIVATE, DEACTIVATE, OPEN, or CLOSE parameters are specified. The DESTINATION parameter supplies the name of the destination that should be activated, deactivated, opened, or closed. The destination specified must be defined to the Event Replicator Server.

>   If "ACTIVATE" is specified, the destination must already be inactive; if "DEACTIVATE" is specified, the destination must already be activated.

>   If "OPEN" is specified, the destination must be in an unavailable state; if "CLOSE" is specified, the destination must be in an available state.

>   The DESTINATION parameter is mutually exclusive with the DBID, FILE, IQUEUE, and SUBSCRIPTION parameters.

> FILE: Replicated File

>   The FILE parameter will activate or deactivate replication for a single file in a specific database. A corresponding DBID parameter must also be specified.

>   If "ACTIVATE" is specified, the file must already be deactivated; if "DEACTIVATE" is specified, the file must already be activated.

>   The FILE parameter is mutually exclusive with the DESTINATION, IQUEUE, and SUBSCRIPTION parameters.

> IQUEUE: Replication Input Queue

>   The IQUEUE parameter can only be specified when the OPEN or CLOSE parameters are specified. It supplies the name of the input queue (IQUEUE) that should be opened or closed and must be defined to the Event Replicator Server.

>   If "OPEN" is specified, the input queue must be in an unavailable state; if "CLOSE" is specified, the input queue must be in an available state.

>   The IQUEUE parameter is mutually exclusive with the DBID, DESTINATION, FILE, and SUBSCRIPTION parameters.

> SUBSCRIPTION: Replication Subscription

>   The subscription specified for the SUBSCRIPTION parameter must be defined to the Event Replicator Server. It specifies the name of the subscription definition to use.

>   If "ACTIVATE" is specified, the subscription must already be deactivated. If "DEACTIVATE" is specified, the subscription must already be activated.

>   The SUBSCRIPTION parameter is mutually exclusive with the DBID, FILE, IQUEUE, and DESTINATION parameters.

### Examples

The following example requests that the Event Replicator Server activate all inactive files for database 232.

    ADADBS REPTOR ACTIVATE,DBID=232

The following example requests that the Event Replicator Server activate file 2 on database 232. The file is currently inactive.

    ADADBS REPTOR ACTIVATE,DBID=232,FILE=2

The following example requests that the Event Replicator Server activate the destination defined by the DEST0001 destination. The destination is currently inactive.

    ADADBS REPTOR ACTIVATE,DESTINATION=DEST0001

The following example requests that the Event Replicator Server activate the subscription defined by the SUBS0001 subscription. The subscription is currently inactive.

    ADADBS REPTOR ACTIVATE,SUBSCRIPTION=SUBS0001

The following example requests that the Event Replicator Server deactivate all active files for database 232.

    ADADBS REPTOR DEACTIVATE,DBID=232

The following example requests that the Event Replicator Server deactivate file 2 on database 232. The file is currently active.

    ADADBS REPTOR DEACTIVATE,DBID=232,FILE=2

The following example requests that the Event Replicator Server deactivate the destination defined by the DEST0001 destination. The destination is currently active.

    ADADBS REPTOR DEACTIVATE,DESTINATION=DEST0001

The following example requests that the Event Replicator Server deactivate the subscription defined by the SUBS0001 subscription. The subscription is currently active.

    ADADBS REPTOR DEACTIVATE,SUBSCRIPTION=SUBS0001

The following example requests that theEvent Replicator Server open (restart) destination DEST0001. Each output task will be asked to process the destination if that output task does not already have the destination open for processing.

    ADADBS REPTOR OPEN,DESTINATION=DEST0001

The following example requests that the Event Replicator Server close destination DEST0001. Each output task will be asked to close the destination if that output task does not already have the destination closed for processing.

    ADADBS REPTOR CLOSE,DESTINATION=DEST0001

The following example requests that the Event Replicator Server open (restart) input queue IQUEUE01. Each input task will be asked to open the input queue if that input task does not already have the input queue open for processing.

    ADADBS REPTOR OPEN,IQUEUE=IQUEUE01

The following example requests that the Event Replicator Server close input queue IQUEUE01. Each input task will be asked to close the input queue if that input task does not already have the input queue closed for processing.

    ADADBS REPTOR CLOSE,IQUEUE=IQUEUE01

### On this page

- ADADBS MODFCB Parameters
- ADADBS OPERCOM Parameters
- ADADBS REPLICATION Function
- ADADBS REPTOR Function