CDR_SERIAL Configuration Parameter

Enables control over generating values for serial columns in tables that are defined for replication.

onconfig.std value
CDR_SERIAL 0
range of values
0 = Default. Disable control of serial column value generation.

delta,offset = Enable control of serial column value generation:

delta
A positive integer that sets the incremental size of the serial column values. This value must be the same on all replication servers and must be at least the number of expected servers in the Enterprise Replication domain.
offset
A positive integer that sets the offset of the serial value to be generated. This value must be different on all replication servers and must be between 0 and one less than the value of delta, inclusive.
takes effect
After you edit your onconfig file and restart the database server.
After you run the cdr change onconfig command.

The CDR_SERIAL configuration parameter controls generating values for SERIAL, SERIAL8, and BIGSERIAL columns in replicated tables so that no conflicting values are generated across multiple Enterprise Replication servers. You must set the CDR_SERIAL configuration parameter if the serial column is the replication key column and no other replication key column, such as a server ID, guarantees the uniqueness of the replication key. If the serial column is not the replication key, you can set the CDR_SERIAL configuration parameter to ensure that the serial values are unique across all servers. Only tables that are marked as the source of a replicate are controlled by the CDR_SERIAL configuration parameter settings.

For example, suppose that you have two primary servers, g_usa and g_japan, and one read-only target server, g_italy. You plan to add three more servers in the future. You might set CDR_SERIAL to the values shown in the following table.

Table 1. CDR_SERIAL Example Settings and Results
Server Example CDR_SERIAL Value Resulting Values for the Serial Column
g_usa 5,0 5, 10, 15, 20, 25, and so on
g_japan 5,1 1, 6, 11, 16, 21, 26, and so on
g_italy 0 no local inserts into the serial column
The following CDR_SERIAL settings are reserved for future servers:
  • 5,2
  • 5,3
  • 5,4

If you must add more servers than the delta value of CDR_SERIAL, you must reset CDR_SERIAL on all servers simultaneously and ensure that the serial values on the new servers are unique.