Define Template

Use this page to define a new template. Specify the tables to use for the template, the database and server in which the tables are located, and the template options.

A template defines a group of master replicates and a replicate set. A template consists of schema information about a database, a group of tables, column attributes, and the primary keys that identify rows.

Important: After you define a template, to replicate data in an ER domain based on the replicates in the template, you must instantiate the template on at least two servers by using the Realize Template action.
Prerequisites: Only tables that can be replication participants are displayed in the list of selectable tables. These restrictions determine which tables are displayed:
  • The table must have a primary key or the ERKEY shadow columns to be a replication participant.
  • The table must be an actual table. It cannot be a synonym, a view, or a sequence.
  • The table cannot be an external table.
  • The database that contains the table cannot be an ANSI database. OAT does not support defining replicates that include ANSI databases, although replicates that include ANSI databases are supported by the IBM® Informix® database server.
  • The database must be a logging database. Enterprise Replication requires that the databases involved in replication are created with logging.
  • The database cannot be a system database; for example, sysadmin or sysmaster.

Template name

Type a name for the template. The name must be unique and cannot be the same as a replicate or replicate set name. The template name must be a long identifier, which follows the guidelines of SQL syntax.

Tables

This list displays the servers in the current ER domain.

Server filter
To display the tables in a server, start typing the server name in the text box. Or expand the server in the list.
Database filter
To display the tables in a database, start typing the database name in the text box. Or expand the server that contains the database, and then expand the database.

Template

This list displays the tables that are selected for the template, and the database and server in which they are located.

  • To add all the tables in a database to the list, select the database in the Tables list, and then click Add.
  • To add a specific table, select the table, and then click Add.
  • To remove a table from the list, select it, and then click Remove, or click Remove All.

A template cannot define tables from more than one database. When you select a table, all the other databases become unavailable. To select tables from a different database, first remove the table from the Template list.

Next or Finish

  • To create the template with the default options, click Finish. You can then instantiate the template by using the Realize Template action. Data replication does not start until the template is instantiated on at least two servers.
  • To specify the options, click Next.

Conflict Resolution Scope

Specify the scope of ER conflict resolution.

Table 1. Conflict Resolution Scope
Option Description
Row ER evaluates one row at a time. It applies only replicated rows that win the conflict resolution with the target row.
Transaction (Default) ER applies the entire transaction if the replicated transaction wins the conflict resolution.

Conflict Resolution Rule

Specify the ER conflict resolution rule.

Table 2. Conflict Resolution Rule
Option Description
Ignore ER does not attempt to detect or resolve conflicts. A row or transaction either is applied successfully or fails.
Always apply ER does not attempt to detect or resolve conflicts. Replicated changes are applied even if the operations are not the same on the source and target servers.
Time stamp (Default) ER evaluates the latest time stamp of the replication against the target and determines how to resolve any conflict.
Delete wins Delete and insert operations always win over update operations. All other conflicts are resolved by comparing time stamps. Use the delete wins conflict resolution rule to have the row or transaction with a delete operation take precedence in a conflict and to resolve all other conflicts by comparing time stamps. The delete wins conflict resolution rule prevents upserts.
Prerequisite: For this rule to be available, the ER conflict resolution columns (CRCOLS) must be defined in the tables.

Floating Point Format

Specify how ER transfers replicated floating-point numbers.

Table 3. Floating Point Format
Option Description
IEEE (Default) ER transfers replicated floating-point numbers in either 32-bit (for SMALLFLOAT) or 64-bit (for FLOAT) IEEE floating point format. Use this option for all new replicate definitions.
Canonical ER transfers replicated floating-point numbers in machine-independent decimal representation. This format is provided for compatibility with earlier versions only.

Special Options

Specify any of these special options.

Table 4. Special Options
Option Description
Activate aborted transaction spooling (ATS) Activates aborted transaction spooling for replicate transactions that fail to be applied to the target database, if the conflict resolution rule is other than ignore or always-apply. By default, ATS is not activated.
Activate row information spooling (RIS) Activates row-information spooling for replicate row data that fails conflict resolution or encounters replication order problems, if the conflict resolution rule is other than ignore or always-apply. By default, RIS is not activated.
Replicate full row Specifies to replicate the full row and enable upserts. If this option is not selected, ER replicates only changed columns and disables upserts. By default, ER always replicates the entire row and enables upserts.
Fire triggers at destination Specifies that the rows that are inserted by this replicate fire triggers at the destination. By default, triggers are not fired at the destination table.
Enable replication between code sets (UTF-8) Specifies that character columns are converted to UTF-8 when the row is copied into the transmission queue. When the replicated row is applied on the target server, the data is converted from UTF-8 to the code set that is used on the target server. No attempt is made to convert character data contained within opaque data types such as user-defined types (UDTs) or DataBlade data.
Prerequisite: This option requires IBM Informix 11.70.xC3 or later.

Copyright© 2018 HCL Technologies Limited