IBM Support

Knowledge Collection - IDS Replication

Technote (troubleshooting)


Problem(Abstract)

This document will help you navigate through the available information and resources related to Enterprise Replication

Resolving the problem



Overview of Enterprise Replication
Enterprise Replication Terminology
How Enterprise Replication Works
Onstats for Enterprise Replication
New Features
Additional resources




Overview of Enterprise Replication


Enterprise Replication (a.k.a CDR) is one of the availability solutions offered by Informix Dynamic Server. ER is part of the server. ER is log based and focuses on replicating user transactions. ER is asynchronous. All replication happens after the user transaction is complete.

ER supports both primary-target and update anywhere replication system. In the primay-target replication system, changes originate at the primary database server and are replicated to the target database server. Changes at the target server are not replicated to the primary. In the update anywhere replication, changes made on any participating database server are replicated to all other participating database servers.

ER can be configured to automatically detect the collision at the target site when they occur. This can be configured based upon the commit time of the transaction or based on business logic using SPL.

ER can be configured such that if rows/transactions abort at the target, they can be spooled to an ASCII file for review and re-synchronization.

The user can specify which transactions are to be replicated by creating an abstraction called a ‘replicate’ which specifies tables on two or more servers which are to participate in that replicate.


Back to top



Enterprise Replication Terminology

Server : Any IDS instance which is configured for Enterprise Data Replication is referred to as a server. Server can be a source server or target server.

Source Server : Also referred to as Primary or Publisher is the originator of the data modification.
Target Server : Also referred to as Secondary, Subscriber receives the modified data. Source and Target servers can be the same or different versions of IDS. IDS can be installed on the same or different hardware platforms. For example : Source serve can be on a HP machine and Target server can be on Solaris machine.

Replicate and Replicate set : The basic component for defining what data gets replicated, where it's replicated , when it's replicated, how collision/conflict is handled . It is defined at the table level. Database to which table belongs must be logged.

Participant : It's combination of server, database, owner and table name. Each table that is participant must have a primary key defined.

Participant Modifier : Select statement that defines what rows and columns get replicated. It is used as a part of the replicate definition and must be enclosed in the quotation mark.

Template : Provides a way to setup replication for group of tables on one or more servers.

Global Catalog : Consists of two parts: a Shared Memory portion and a Stable portion stored on disk. The stable portion is basically the syscdr database. Global catalog is the ‘in-memory’ representation of the syscdr database. It is responsible for maintaining all the information required for ER. i.e. server, replicate, and status information. Onstat uses the shared memory portion, while the stable portion on disk is used by cdr commands.

Sync Server: A sync server is used during initialization of an ER server. It is the ER server, from which, a new ER server gets a copy of the syscdr database. This will tell the new server about any other ER servers already defined, any defined replicates, etc…

Back to top



How Enterprise Replication Works

Work flow of overall ER can be divided into Source components and Target Components.

Source Components : When applications insert. update. delete rows on ER server, those rows are written to transaction/logical logs. ER snoops the logical logs on the source.
Rows are evaluated against the Global Catalog to see if they are eligible for replication. Each server involved in an ER has a Global Catalog.

Rows that need to be replicated for a given transaction are grouped internally . Once a commit is issued, transactions are put into a Send Queue in commit order.

ER stores replication data in memory to be delivered to target database servers that participate in a replicate. If the send queue fills, ER spools the send-queue transaction records to a dbspace and the send-queue row data to an sbspace.

A separate network NIF will then transmit the transaction to any required target servers where it will be picked up on the other side by the NIF and placed in the receive queue.

Some queues have a progress table. Progress tables are maintained in both directions – there is one for the send queue and a separate one for the receive queue. The send progress table is used to prevent us from sending the same transaction twice to the same target after recovery of the engine.



Target Components : Transactions are received by the NIF on the target node into a Receive Queue, in commit order.

From the Receive Queue, transactions are picked by a DataSync thread, and applied to destination tables. Any problems applying the data, are reported to spooling directories.

Once applied, an acknowledgement for each transaction is placed on an Ack queue and then sent to the source server, again in source commit order.

When a transaction is applied on the target, the datasync thread will update the receive queue’s progress table to reflect that is the last known transaction applied for that particular replicate from that particular site.




After reviewing overview of how replication works, use the below link which shows how to setup Enterprise replication.

How to setup up Enterprise Replication for the first Time


Back to top



Onstats for Enterprise Replication

Please refer Information Center for detailed explanation of each onstat command.





Back to top




New Features

New Features in 10.00.xC9

New Feature in 11.50.xC4


Back to top


Additional resources / links

Complete cdr utility guide

The Information Center

developerWorks Information Management
You can take advantage all of the technical resources that IBM can offer to Informix developers. This Web site provides a range of tools, code samples, education, and newsgroups to help you learn about Informix IDS database product features.

Replication Round Table ( Blog )

Chat with the Lab

Enterprise Replication templates

Enterprise Replication Schema Evolution

Redbooks

Redbook V10

Red book V11

Trouble Shooting

If you encounter problem initializing Enterprise replication, Please use the below link to gather diagnostic information.

Collecting Data: IDS Enterprise Replication (ER) Initialization


Informix Developer and User Forum


Back to top

Document information

More support for: Informix Servers

Software version: 11.1, 11.5

Operating system(s): AIX, HP-UX, Linux, Solaris

Reference #: 1403483

Modified date: 29 September 2009


Translate this page: