CREATE REPLICATION

This statement is not supported in TimesTen Scaleout.

In TimesTen Classic:

The CREATE REPLICATION statement:

  • Defines a classic replication scheme on a participating database.

  • Installs the specified configuration in the executing database's replication system tables.

  • Typically consists of one or more replication element specifications and zero or more STORE specifications.

TimesTen SQL configuration for replication also provides a programmable way to configure a classic replication scheme. The configuration can be embedded in C, C++ or Java code. Replication can be configured locally or from remote systems using client/server.

In addition, you need to use the ttRepAdmin utility to maintain operations not covered by the supported SQL statements. Use ttRepAdmin to change replication state, duplicate databases, list the replication configuration, and view replication status.

Required Privilege

ADMIN

Usage with TimesTen Scaleout

This statement is not supported with TimesTen Scaleout.

Definitions

A replication element is an entity that TimesTen synchronizes between databases. A replication element can be a whole table or a database. A database can include most types of tables and sequences. It can include only specified tables and sequences, or include all tables except specified tables and sequences. It cannot include temporary tables or views, whether materialized or nonmaterialized.

A replication scheme is a set of replication elements, as well as the databases that maintain copies of these elements.

For more detailed information on SQL configuration for classic replication, see Defining a Classic Replication Scheme in the Oracle TimesTen In-Memory Database Replication Guide.

SQL Syntax

CREATE REPLICATION [Owner.]ReplicationSchemeName
{ ELEMENT ElementName
  { DATASTORE | { TABLE [Owner.]TableName [CheckConflicts]} | 
       SEQUENCE [Owner.]SequenceName}
     { MASTER | PROPAGATOR } FullStoreName
     [TRANSMIT { NONDURABLE | DURABLE }]
     { SUBSCRIBER FullStoreName [,...]
        [ReturnServiceAttribute] } [,...] }
     [...]
     [{INCLUDE | EXCLUDE}
          {TABLE [[Owner.]TableName[,...]] |
           SEQUENCE [[Owner.]SequenceName[,...]} [,...]] 
[ STORE FullStoreName [StoreAttribute [... ]]] [...]
[ NetworkOperation[...]]

See CHECK CONFLICTS for CheckConflicts syntax.

Syntax for ReturnServiceAttribute:

{ RETURN RECEIPT [BY REQUEST] |
  RETURN TWOSAFE [BY REQUEST] |
  NO RETURN }

Syntax for StoreAttribute:

  DISABLE RETURN {SUBSCRIBER | ALL} NumFailures 
  RETURN SERVICES {ON | OFF} WHEN [REPLICATION] STOPPED 
  DURABLE COMMIT {ON | OFF}
  RESUME RETURN Milliseconds 
  LOCAL COMMIT ACTION {NO ACTION | COMMIT} 
  RETURN WAIT TIME Seconds 
  COMPRESS TRAFFIC {ON | OFF}
  PORT PortNumber 
  TIMEOUT Seconds 
  FAILTHRESHOLD Value 
  CONFLICT REPORTING SUSPEND AT Value 
  CONFLICT REPORTING RESUME AT Value 
  TABLE DEFINITION CHECKING {RELAXED|EXACT}

Syntax for NetworkOperation:

ROUTE MASTER FullStoreName SUBSCRIBER FullStoreName
  { { MASTERIP MasterHost | SUBSCRIBERIP SubscriberHost }
      PRIORITY Priority } [...]

Parameters

Parameter Description

[Owner.]ReplicationSchemeName

Name assigned to the new classic replication scheme. Classic replication schemes should have names that are unique from all other database objects.

CheckConflicts

Check for replication conflicts when simultaneously writing to bidirectionally replicated databases. See CHECK CONFLICTS for information on CheckConflicts.

COMPRESS TRAFFIC {ON | OFF}

Compress replicated traffic to reduce the amount of network bandwidth. ON specifies that all replicated traffic for the database defined by STORE be compressed. OFF (the default) specifies no compression. See Compressing Replicated Traffic in Oracle TimesTen In-Memory Database Replication Guide for details.

CONFLICT REPORTING SUSPEND AT Value

Suspends conflict resolution reporting.

Value is a non-negative integer. The default is 0 and means never suspend. Conflict reporting is suspended when the rate of conflict exceeds Value. If you set Value to 0, conflict reporting suspension is turned off.

This clause is valid for table level replication.

CONFLICT REPORTING RESUME AT Value

Resumes conflict resolution reporting.

Value is a non-negative integer. Conflict reporting is resumed when the rate of conflict falls below Value. The default is 1.

This clause is valid for table level replication.

DATASTORE

Define entire database as element. This type of element can only be defined for a master database that is not configured with an element of type TABLE in the same or a different replication scheme.

{INCLUDE|EXCLUDE}

{[TABLE[Owner.]TableName [,...]]|

SEQUENCE

[[Owner.]SequenceName[,...]]} [,...]

INCLUDE includes in the DATASTORE element only the tables or sequences listed. Use one INCLUDE clause for each object type (table or sequence).

EXCLUDE includes in the DATASTORE element all tables or sequences except for those listed. Use one EXCLUDE clause for each object type (table or sequence).

DISABLE RETURN {SUBSCRIBER|ALL} NumFailures

Set the return service failure policy so that return service blocking is disabled after the number of timeouts specified by NumFailures. Selecting SUBSCRIBER applies this policy only to the subscriber that fails to acknowledge replicated updates within the set timeout period. ALL applies this policy to all subscribers should any of the subscribers fail to respond. This failure policy can be specified for either the RETURN RECEIPT or RETURN TWOSAFE service.

If DISABLE RETURN is specified but RESUME RETURN is not specified, the return services remain off until the replication agent for the database has been restarted.

DURABLE COMMIT {ON|OFF}

Overrides the DurableCommits general connection attribute setting. DURABLE COMMIT ON enables durable commits regardless of whether the replication agent is running or stopped.

ELEMENT ElementName

The entity that TimesTen synchronizes between databases. TimesTen supports the entire database (DATASTORE) and whole tables (TABLE) as replication elements.

ElementName is the name given to the replication element. The ElementName for a TABLE element can be up to 30 characters in length. The ElementName for a DATASTORE element must be unique with respect to other DATASTORE element names within the first 20 characters. Each ElementName must be unique within a classic replication scheme. Also, you cannot define two element descriptions for the same element.

See Defining Replication Elements in Oracle TimesTen In-Memory Database Replication Guide for details.

FAILTHRESHOLD Value

The number of log files that can accumulate for a subscriber database. If this value is exceeded, the subscriber is set to the Failed state.The value 0 means "No Limit." This is the default.

See Setting the Transaction Log Failure Threshold in Oracle TimesTen In-Memory Database Replication Guide.

FullStoreName

The database, specified as one of the following:

  • SELF

  • The prefix of the database file name

For example, if the database path is directory/subdirectory/data.ds0, then data is the database name that should be used.

This is the database file name specified in the DataStore attribute of the DSN description with optional host ID in the form:

DataStoreName [ON Host]

Host can be either an IP address or a literal host name assigned to one or more IP addresses, as described in Configuring the Network in Oracle TimesTen In-Memory Database Replication Guide. Host names containing special characters must be surrounded by double quotes. For example: "MyHost-500". Host names can be up to 30 characters long.

LOCAL COMMIT ACTION {NO ACTION | COMMIT}

Specifies the default action to be taken for a return twosafe transaction in the event of a timeout.

Note: This attribute is only valid when the RETURN TWOSAFE or RETURN TWOSAFE BY REQUEST attribute is set in the SUBSCRIBER clause.

NO ACTION: On timeout, the commit function returns to the application, leaving the transaction in the same state it was in when it entered the commit call, with the exception that the application is not able to update any replicated tables. The application can only reissue the commit. The transaction may not be rolled back. This is the default.

COMMIT: On timeout, the commit function attempts to perform a COMMIT to end the transaction locally. No more operations are possible on the same transaction.

This setting can be overridden for specific transactions by calling the localAction parameter in the ttRepSyncSet procedure.

MASTER FullStoreName

The database on which applications update the specified element. The MASTER database sends updates to its SUBSCRIBER databases. The FullStoreName must be the database specified in the DataStore attribute of the DSN description.

NO RETURN

Specifies that no return service is to be used. This is the default.

For details on the use of the return services, see Using a Return Service in Oracle TimesTen In-Memory Database Replication Guide.

PORT PortNumber

The TCP/IP port number on which the replication agent for the database listens for connections. If not specified, the replication agent automatically allocates a port number.

PROPAGATOR FullStoreName

The database that receives replicated updates and passes them on to other databases. The FullStoreName must be the database specified in the DataStore attribute of the DSN description.

RESUME RETURN Milliseconds

If return service blocking has been disabled by DISABLE RETURN, this attribute sets the policy on when to re-enable return service blocking. Return service blocking is re-enabled as soon as the failed subscriber acknowledges the replicated update in a period of time that is less than the specified Milliseconds.

If DISABLE RETURN is specified but RESUME RETURN is not specified, the return services remain off until the replication agent for the database has been restarted.

RETURN RECEIPT [BY REQUEST]

Enables the return receipt service, so that applications that commit a transaction to a master database are blocked until the transaction is received by all subscribers.

RETURN RECEIPT applies the service to all transactions. If you specify RETURN REQUEST BY REQUEST, you can use the ttRepSyncSet procedure to enable the return receipt service for selected transactions. For details on the use of the return services, see Using a Return Service in Oracle TimesTen In-Memory Database Replication Guide.

RETURN SERVICES {ON|OFF} WHEN [REPLICATION] STOPPED

Sets return services on or off when replication is disabled (stopped or paused state).

OFF disables return services when replication is disabled and is the default for RETURN RECEIPT service. ON allows return services to continue to be enabled when replication is disabled and is the default for RETURN TWOSAFE service.

RETURN TWOSAFE [BY REQUEST]

Enables the return twosafe service, so that applications that commit a transaction to a master database are blocked until the transaction is committed on all subscribers.

Note: This service can only be used in a bidirectional replication scheme where the elements are defined as DATASTORE.

Specifying RETURN TWOSAFE applies the service to all transactions. If you specify RETURN TWOSAFE BY REQUEST, you can use the ttRepSyncSet procedure to enable the return receipt service for selected transactions. For details on the use of the return services, see Using a Return Service in Oracle TimesTen In-Memory Database Replication Guide.

RETURN WAIT TIME Seconds

Specifies the number of seconds to wait for return service acknowledgment. The default value is 10 seconds. A value of 0 (zero) means that there is no timeout. Your application can override this timeout setting by calling the returnWait parameter in the ttRepSyncSet procedure.

SEQUENCE [Owner.]SequenceName

Define the sequence specified by [Owner.]SequenceName as element. See Defining Replication Elements in Oracle TimesTen In-Memory Database Replication Guide for details.

STORE FullStoreName

Defines the attributes for a given database. Attributes include PORT, TIMEOUT and FAILTHRESHOLD. The FullStoreName must be the database specified in the DataStore attribute of the DSN description.

SUBSCRIBER FullStoreName

A database that receives updates from the MASTER databases. The FullStoreName must be the database specified in the DataStore attribute of the DSN description.

TABLE [Owner.]TableName

Define the table specified by [Owner.]TableName as element. See Defining Replication Elements in Oracle TimesTen In-Memory Database Replication Guide for details.

TIMEOUT Seconds

The maximum number of seconds the replication agent waits for a response from remote replication agents. The default is 120 seconds.

Note: For large transactions that may cause a delayed response from the remote replication agent, the agent scales the timeout based on the size of the transaction. This scaling is disabled if you set TIMEOUT to less than or equal to 60 seconds. Also see Setting Wait Timeout for Response from Remote Replication Agents in Oracle TimesTen In-Memory Database Replication Guide.

TRANSMIT {DURABLE | NONDURABLE}

Specifies whether to flush the master log to the file system before sending a batch of committed transactions to the subscribers.

TRANSMIT NONDURABLE specifies that records in the master log are not to be flushed to the file system before they are sent to subscribers. This setting can only be used if the specified element is a DATASTORE. This is the default for RETURN TWOSAFE transactions.

TRANSMIT DURABLE specifies that records are to be flushed to the file system before they are sent to subscribers. This is the default for asynchronous and RETURN RECEIPT transactions.

Note: TRANSMIT DURABLE has no effect on RETURN TWOSAFE transactions.

Note: TRANSMIT DURABLE cannot be set for active standby pairs.

See Setting Transmit Durability on DATASTORE Element in Oracle TimesTen In-Memory Database Replication Guide for more information.

TABLE DEFINITION CHECKING {EXACT|RELAXED}

Specifies type of table definition checking that occurs on the subscriber:

  • EXACT: The tables must be identical on master and subscriber.

  • RELAXED: The tables must have the same key definition, number of columns and column data types.

The default is RELAXED.

Note: If you use TABLE DEFINITION CHECKING EXACT, use ttMigrate -exactUpgrade if you migrate the database. If you use TABLE DEFINITION CHECKING RELAXED, use ttMigrate -relaxedUpgrade if you migrate the database.

ROUTE MASTER FullStoreName SUBSCRIBER FullStoreName

Denotes the NetworkOperation clause. If specified, enables you to control the network interface that a master store uses for every outbound connection to each of its subscriber stores.

Can be specified more than once.

For FullStoreName, ON "host" must be specified.

MASTERIP MasterHost | SUBSCRIBERIP SubscriberHost

MasterHost and SubscriberHost are the IP addresses for the network interface on the master and subscriber stores. Specify in dot notation or canonical format or in colon notation for IPV6.

Clause can be specified more than once.

PRIORITY Priority

Variable expressed as an integer from 1 to 99. Denotes the priority of the IP address. Lower integral values have higher priority. An error is returned if multiple addresses with the same priority are specified. Controls the order in which multiple IP addresses are used to establish peer connections.

Required syntax of NetworkOperation clause. Follows MASTERIP MasterHost | SUBSCRIBERIP SubscriberHost clause.

CHECK CONFLICTS

Syntax

The syntax for CHECK CONFLICTS is:

{NO CHECK |
CHECK CONFLICTS BY ROW TIMESTAMP
      COLUMN ColumnName
      [ UPDATE BY { SYSTEM | USER } ]
      [ ON EXCEPTION { ROLLBACK [ WORK ] | NO ACTION } ]
      [ {REPORT TO 'FileName'
             [ FORMAT { XML | STANDARD } ] | NO REPORT
      } ]
}

Note:

A CHECK CONFLICT clause can only be used for elements of type TABLE.

Parameters

The CHECK CONFLICTS clause of the CREATE REPLICATION or ALTER REPLICATION statement has the following parameters:

Parameter Description

CHECK CONFLICTS BY ROW TIMESTAMP

Indicates that all update and uniqueness conflicts are to be detected. Conflicts are resolved in the manner specified by the ON EXCEPTION parameter.

It also detects delete conflicts with UPDATE operations.

COLUMN ColumnName

Indicates the column in the replicated table to be used for timestamp comparison. The table is specified in the ELEMENT description by TableName.

ColumnName is a nullable column of type BINARY(8) used to store a timestamp that indicates when the row was last updated. TimesTen rejects attempts to update a row with a lower timestamp value than the stored value. The specified ColumnName must exist in the replicated table on both the master and subscriber databases.

NO CHECK

Specify to suppress conflict resolution for a given element.

UPDATE BY {SYSTEM | USER}

Specifies whether the timestamp values are maintained by TimesTen (SYSTEM) or the application (USER). The replicated table in the master and subscriber databases must use the same UPDATE BY specification. See Enabling System Timestamp Column Maintenance and Enabling User Timestamp Column Maintenance in Oracle TimesTen In-Memory Database Replication Guide for more information. The default is UPDATE BY SYSTEM.

ON EXCEPTION {ROLLBACK[WORK |NO ACTION}

Specifies how to resolve a detected conflict. ROW TIMESTAMP conflict detection has the resolution options:

  • ROLLBACK [WORK]: Abort the transaction that contains the conflicting action.

  • NO ACTION: Complete the transaction without performing the conflicting action (UPDATE, INSERT or DELETE).

The default is ON EXCEPTION ROLLBACK [WORK].

REPORT TO 'FileName'

Specifies the file to log updates that fail the timestamp comparison. FileName is a SQL character string that cannot exceed 1,000 characters. (SQL character string literals are single-quoted strings that may contain any sequence of characters, including spaces.) The same file can be used to log failed updates for multiple tables.

[FORMAT {XML|STANDARD}]

Optionally specifies the conflict report format for an element. The default format is STANDARD.

NO REPORT

Specify to suppress logging of failed timestamp comparisons.

Description

  • The names of all databases on the same host must be unique for each classic replication scheme for each TimesTen instance.

  • Replication elements can only be updated (by normal application transactions) through the MASTER database. PROPAGATOR and SUBSCRIBER databases are read-only.

  • If you define a classic replication scheme that permits multiple databases to update the same table, see Resolving Replication Conflicts in Oracle TimesTen In-Memory Database Replication Guide for recommendations on how to avoid conflicts when updating rows.

  • SELF is intended for classic replication schemes where all participating databases are local. Do not use SELF for a distributed classic replication scheme in a production environment, where spelling out the host name for each database in a script enables it to be used at each participating database.

  • Each attribute for a given STORE may be specified only once, or not at all.

  • Specifying the PORT of a database for one classic replication scheme specifies it for all classic replication schemes. All other connection attributes are specific to the classic replication scheme specified in the command.

  • For replication schemes, DataStoreName is always the prefix of the TimesTen database checkpoint file names. These are the files with the.ds0 and.ds1 suffixes that are saved on the file system by checkpoint operations.

  • If a row with a default NOT INLINE VARCHAR value is replicated, the receiver creates a copy of this value for each row instead of pointing to the default value if and only if the default value of the receiving node is different from the sending node.

  • To use timestamp comparison on replicated tables, you must specify a nullable column of type BINARY(8) to hold the timestamp value. Define the timestamp column when you create the table. You cannot add the timestamp column with the ALTER TABLE statement. In addition, the timestamp column cannot be part of a primary key or index.

  • If you specify the XML report format, two XML documents are generated:

    • FileName.xml: This file contains the DTD for the report and the root node for the report. It includes the document definition and the include directive.

    • FileName.include: This file is included in FileName.xml and contains all the actual conflicts.

    • The FileName.include file can be truncated. Do not truncate the FileName.xml file.

    • For a complete description of the XML format, including examples of each conflict, see Reporting Conflicts to an XML File in Oracle TimesTen In-Memory Database Replication Guide.

  • If you specify a report format for an element and then drop the element, the corresponding report files are not deleted.

  • Use the CONFLICT REPORTING SUSPEND AT clause to specify a high water mark threshold at which the reporting of conflict resolution is suspended.

  • Use the CONFLICT REPORTING RESUME AT clause to specify a low water mark threshold where the reporting of conflict resolution is resumed. When the rate of conflict falls below the low water mark threshold, conflict resolution reporting is resumed.

  • The state of whether conflict reporting is suspended or not by a replication agent does not persist across the local replication agent and the peer agent stop and restart.

  • Do not use the CREATE REPLICATION statement to replicate cache groups. Only active standby pairs can replicate cache groups. See the CREATE ACTIVE STANDBY PAIR statement.

Examples

Replicate the contents of repl.tab from masterds to two subscribers, subscriber1ds and subscriber2ds.

CREATE REPLICATION repl.twosubscribers
       ELEMENT e TABLE repl.tab
         MASTER masterds ON "server1"
         SUBSCRIBER subscriber1ds ON "server2",
                    subscriber2ds ON "server3";

Replicate the entire masterds database to the subscriber, subscriber1ds. The FAILTHRESHOLD specifies that a maximum of 10 log files can accumulate on masterds before it decides that subscriber1ds has failed.

CREATE REPLICATION repl.wholestore
  ELEMENT e DATASTORE
     MASTER masterds ON "server1"
     SUBSCRIBER subscriber1ds ON "server2"
  STORE masterds FAILTHRESHOLD 10;

Bidirectionally replicate the entire westds and eastds databases and enable the RETURN TWOSAFE service.

CREATE REPLICATION repl.biwholestore
  ELEMENT e1 DATASTORE
     MASTER westds ON "westcoast"
     SUBSCRIBER eastds ON "eastcoast"
        RETURN TWOSAFE
  ELEMENT e2 DATASTORE
     MASTER eastds ON "eastcoast"
     SUBSCRIBER westds ON "westcoast"
        RETURN TWOSAFE;

Enable the return receipt service for select transaction updates to the subscriber1ds subscriber.

CREATE REPLICATION repl.twosubscribers
  ELEMENT e TABLE repl.tab
     MASTER masterds ON "server1"
     SUBSCRIBER subscriber1ds ON "server2"
        RETURN RECEIPT BY REQUEST
     SUBSCRIBER subscriber2ds ON "server3";

Replicate the contents of the customerswest table from the west database to the ROUNDUP database and the customerseast table from the east database. Enable the return receipt service for all transactions.

CREATE REPLICATION r
       ELEMENT west TABLE customerswest
         MASTER west ON "serverwest"
         SUBSCRIBER roundup ON "serverroundup"
            RETURN RECEIPT
       ELEMENT east TABLE customerseast
         MASTER east ON "servereast"
         SUBSCRIBER roundup ON "serverroundup"
            RETURN RECEIPT;

Replicate the contents of the repl.tab table from the centralds database to the propds database, which propagates the changes to the backup1ds and backup2ds databases.

CREATE REPLICATION repl.propagator
       ELEMENT a TABLE repl.tab
         MASTER centralds ON "finance"
         SUBSCRIBER proprds ON "nethandler"
       ELEMENT b TABLE repl.tab
         PROPAGATOR proprds ON "nethandler"
         SUBSCRIBER backup1ds ON "backupsystem1"
                    bakcup2ds ON "backupsystem2";

Bidirectionally replicate the contents of the repl.accounts table between the eastds and westds databases. Each database is both a master and a subscriber for the repl.accounts table.

Because the repl.accounts table can be updated on either the eastds or westds database, it includes a timestamp column (tstamp). The CHECK CONFLICTS clause establishes automatic timestamp comparison to detect any update conflicts between the two databases. In the event of a comparison failure, the entire transaction that includes an update with the older timestamp is rolled back (discarded).

CREATE REPLICATION repl.r1
ELEMENT elem_accounts_1 TABLE repl.accounts
   CHECK CONFLICTS BY ROW TIMESTAMP
      COLUMN tstamp
      UPDATE BY SYSTEM
      ON EXCEPTION ROLLBACK
   MASTER westds ON "westcoast"
   SUBSCRIBER eastds ON "eastcoast"
ELEMENT elem_accounts_2 TABLE repl.accounts
   CHECK CONFLICTS BY ROW TIMESTAMP
      COLUMN tstamp
      UPDATE BY SYSTEM
      ON EXCEPTION ROLLBACK
   MASTER eastds ON "eastcoast"
   SUBSCRIBER westds ON "westcoast";

Replicate the contents of the repl.accounts table from the activeds database to the backupds database, using the return twosafe service, and using TCP/IP port 40000 on activeds and TCP/IP port 40001 on backupds. The transactions on activeds need to be committed whenever possible, so configure replication so that the transaction is committed even after a replication timeout using LOCAL COMMIT ACTION, and so that the return twosafe service is disabled when replication is stopped. To avoid significant delays in the application if the connection to the backupds database is interrupted, configure the return service to be disabled after five transactions have timed out, but also configure the return service to be re-enabled when the backupds database's replication agent responds in under 100 milliseconds. Finally, the bandwidth between databases is limited, so configure replication to compress the data when it is replicated from the activeds database.

CREATE REPLICATION repl.r
ELEMENT elem_accounts_1 TABLE repl.accounts
   MASTER activeds ON "active"
   SUBSCRIBER backupds ON "backup"
      RETURN TWOSAFE
ELEMENT elem_accounts_2 TABLE repl.accounts
   MASTER activeds ON "active"
   SUBSCRIBER backupds ON "backup"
      RETURN TWOSAFE
STORE activeds ON "active"
   PORT 40000
   LOCAL COMMIT ACTION COMMIT
   RETURN SERVICES OFF WHEN REPLICATION STOPPED
   DISABLE RETURN SUBSCRIBER 5
   RESUME RETURN 100
   COMPRESS TRAFFIC ON
STORE backupds ON "backup"
   PORT 40001;

Illustrate conflict reporting suspend and conflict reporting resume clauses for table level replication. Use these clauses for table level replication not database replication. Issue repschemes command to show that replication scheme is created.

Command> CREATE TABLE repl.accounts (tstamp BINARY (8) NOT NULL 
           PRIMARY KEY, tstamp1 BINARY (8));
Command> CREATE REPLICATION repl.r2
           ELEMENT elem_accounts_1 TABLE repl.accounts
           CHECK CONFLICTS BY ROW TIMESTAMP
           COLUMN tstamp1
           UPDATE BY SYSTEM
           ON EXCEPTION ROLLBACK WORK
           MASTER westds ON "west1"
           SUBSCRIBER eastds ON "east1"
  ELEMENT elem_accounts_2 TABLE repl.accounts
  CHECK CONFLICTS BY ROW TIMESTAMP 
  COLUMN tstamp1
  UPDATE BY SYSTEM 
  ON EXCEPTION ROLLBACK WORK 
  MASTER eastds ON "east1"
  SUBSCRIBER westds ON "west1"
  STORE westds
  CONFLICT REPORTING SUSPEND AT 20
  CONFLICT REPORTING RESUME AT 10;
Command> REPSCHEMES;

Replication Scheme REPL.R2:

  Element: ELEM_ACCOUNTS_1
  Type: Table REPL.ACCOUNTS
  Conflict Check Column: TSTAMP1
  Conflict Exception Action: Rollback Work
  Conflict Timestamp Update: System
  Conflict Report File: (none)
  Master Store: WESTDS on WEST1 Transmit Durable
  Subscriber Store: EASTDS on EAST1

  Element: ELEM_ACCOUNTS_2
  Type: Table REPL.ACCOUNTS
  Conflict Check Column: TSTAMP1
  Conflict Exception Action: Rollback Work
  Conflict Timestamp Update: System
  Conflict Report File: (none)
  Master Store: EASTDS on EAST1 Transmit Durable
  Subscriber Store: WESTDS on WEST1

  Store: EASTDS on EAST1
    Port: (auto)
    Log Fail Threshold: (none)
    Retry Timeout: 120 seconds
    Compress Traffic: Disabled

  Store: WESTDS on WEST1
    Port: (auto)
    Log Fail Threshold: (none)
    Retry Timeout: 120 seconds
    Compress Traffic: Disabled
    Conflict Reporting Suspend: 20
    Conflict Reporting Resume: 10

1 replication scheme found.

Example of NetworkOperation clause with 2 MASTERIP and SUBSCRIBERIP clauses:

CREATE REPLICATION r ELEMENT e DATASTORE
MASTER rep1 SUBSCRIBER rep2 RETURN RECEIPT
MASTERIP "1.1.1.1" PRIORITY 1 SUBSCRIBERIP "2.2.2.2"
    PRIORITY 1
MASTERIP "3.3.3.3" PRIORITY 2 SUBSCRIBERIP "4.4.4.4"
    PRIORITY 2;

Example of NetworkOperation clause. Use the default sending interface but a specific receiving network:

CREATE REPLICATION r
ELEMENT e DATASTORE
MASTER rep1 SUBSCRIBER rep2
ROUTE MASTER rep1 ON "machine1" SUBSCRIBER rep2 ON "machine2"
SUBSCRIBERIP "rep2nic2" PRIORITY 1;

Example of using the NetworkOperation clause with multiple subscribers:

CREATE REPLICATION r ELEMENT e DATASTORE
MASTER rep1 SUBSCRIBER rep2,rep3
ROUTE MASTER rep1 ON "machine1" SUBSCRIBER rep2 ON "machine2"
MASTERIP "1.1.1.1" PRIORITY 1 SUBSCRIBERIP "2.2.2.2"
    PRIORITY 1
ROUTE MASTER Rep1 ON "machine1" SUBSCRIBER Rep3 ON "machine2"
MASTERIP "3.3.3.3" PRIORITY 2 SUBSCRIBERIP "4.4.4.4";