A participant defines the data (database, table, and columns) on a database server to be replicated. A replicate contains two or more participants. The participant definition includes the following information:
You must include the server group, database, table owner, and table name when defining a participant, and enclose the entire participant definition in quotation marks.
>>-"-+---+-+---+-database@server_group:owner.table-"----------->< +-P-+ +-O-+ '-R-' '-I-'
Element | Purpose | Restrictions | Syntax |
---|---|---|---|
database | Name of the database that includes the table to be replicated | The database server must be registered with Enterprise Replication. | Long Identifiers |
owner | User ID of the owner of the table to be replicated | Long Identifiers | |
server_group | Name of the database server group that includes the server to connect to | The database server group name must be the name of an existing Enterprise Replication server group in SQLHOSTS. | Long Identifiers |
table | Name of the table to be replicated | The table must be an actual table. It cannot be a synonym or a view. | Long Identifiers |
You can define participants with the following commands:
The P, R, O, and I options are described in the sections below.
The O (owner) option causes permission checks for owner to be applied to the operation (such as insert or update) that is to be replicated and to all actions fired by any triggers. When the O option is omitted, all operations are performed with the privileges of user informix.
On UNIX, if a trigger requires any system-level commands (as specified using the system( ) command in an SPL statement), the system-level commands are executed as the table owner, if the participant includes the O option.
On Windows, if a trigger requires any system-level commands, the system-level commands are executed as a less privileged user because you cannot impersonate another user without having the password, whether or not the participant includes the O option.
Use the I option to disable the table-owner option.
In a primary-target replicate, specify the participant type using the P (primary) and R (receive-only or target) options in the participant definition:
The replicate can contain multiple primary participants.
In an update-anywhere replicate, do not specify either P or R for the participant. Enterprise Replication defines the participant as primary in an update-anywhere replication system.
For example, in the following definition, replicate Rone is update-anywhere:
cdr define repl -c serv1 -C timestamp -S tran Rone \ "db@serv1:owner.table" "select * from table" \ "db@serv2:owner.table" "select * from table"
In replicate Rtwo, serv2 is the primary and serv1 is receive-only.
cdr define repl -c serv1 -C ignore -S tran Rtwo \ "R db@serv1:owner.table" "select * from table" \ "P db@serv2:owner.table" "select * from table"
For more information, see Primary-Target Replication System.
The participant modifier is a restricted SELECT statement. The participant modifier specifies the rows and columns that will be replicated. The participant modifier must be enclosed in quotation marks.
.-,----------. V | >>-"SELECT--+-----column---+-+--FROM--table--WHERE_Clause"----->< '-*--------------'
Element | Purpose | Restrictions | Syntax |
---|---|---|---|
column | Name of a column in the table specified by the participant | The column must exist. | Long Identifiers |
table | The table specified by the participant | This must be the table name only. You cannot specify an owner or a database server. You cannot specify a synonym or a view. | Long Identifiers |
WHERE_Clause | Clause that specifies a subset of table rows to be replicated | WHERE clause syntax; refer to IBM Informix Guide to SQL: Syntax |
The following guidelines apply to a SELECT statement that is used as a participant modifier:
The WHERE clause of the SELECT statement of the participant modifier can reference an opaque UDT, as long as the UDT is always stored in row. For more information, see Considerations for Replicating Opaque Data Types.
You can replicate between the following types with caution:
For detailed information about the SELECT statement and WHERE clause, refer to the IBM Informix Guide to SQL: Syntax.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]