92 Informix Dynamic Server V10: Superior Data Replication for High Availability and Distribution
7.1 Scenarios for making changes to existing ER
Here we present a few scenarios where an already existing replication server,
replicate, and replicate set require some modifications. These are scenarios that
represent typical business needs when using enterprise replication.
To test the scenarios, we implemented a replication environment that was used
for the various tests and demonstrations described in this book. The environment
included 3 servers and the Informix Stores Example Database, described in
detail in Chapter 2, “Preparing the technical infrastructure” on page 7. The
topology for the environment is depicted in Figure 7-1.
Figure 7-1 Project environment topology
7.2 Changing a replication server
Due to changing business requirements, replication server topologies may
require the addition, modification, and deletion of replication servers. Since
replication servers are the replication gatekeepers, these objects also need to be
started, stopped, suspended, and resumed.
Finding replication servers
Banda is the root node of the environment, so we can enter commands there to
find the information desired. For example, to list the replication servers that have
been defined thus far, we used the following list server command:
% cdr list server
stores9
Branch2
stores9
HQ
stores9
Secondary
ER
ER
stores9
Region1
stores9
Branch1
HDR
ER
Primary
Banda (AIX) Kodiak (AIX)
Nile (SLES9) Nile (SLES9)
Banda (AIX)
Chapter 7. Making changes in enterprise replication 93
This results in a listing of all the replication servers that have been defined, as
shown in Example 7-1.
Example 7-1 Environment server listing
test
banda:/home/informix $ cdr list server
SERVER ID STATE STATUS QUEUE CONNECTION CHANGED
-----------------------------------------------------------------------
HQ 100 Active Local 0
Branch1 101 Active 0
Branch2 300 Active Connected 0 Sep 28 11:39:47
Region1 301 Active Connected 0 Sep 28 11:39:40
View an individual server
You can add a server group name to the cdr list server command to view an
individual server, as illustrated in Example 7-2.
Example 7-2 cdr list server <server group name>
banda:/home/informix $ cdr list server region1
NAME ID ATTRIBUTES
-----------------------------------------------------------------------
Region1 301 timeout=500 root=g_hq leaf
View a server via a global catalog on another server
The cdr list server command also takes the option: --connect=<ids server>
to list servers from a global catalog on another server. This is illustrated in
Example 7-3.
Example 7-3 cdr list server --connect=<ids server>
banda:/home/informix $ cdr list server --connect=ban_er2
SERVER ID STATE STATUS QUEUE CONNECTION CHANGED
-----------------------------------------------------------------------
Branch1 101 Active Local 0
Branch2 300 Active Connected 0 Sep 28 11:39:58
Modifying a replication server
When we created the replication servers, some of them timed out due to a low
idle time. To modify any of the servers to increase the idle timeout, use the
procedure as illustrated in Example 7-4. Note that the first update to the Branch1
node received an error. Why? The Branch1 node is a leaf node and does not
94 Informix Dynamic Server V10: Superior Data Replication for High Availability and Distribution
have a complete catalog. We then updated the Region1 node to which the
Branch1 node is connected with the following command:
% cdr modify server
This command allows the modification of a replication server definition, but is
limited to modifying only the idle timeout, location of the Aborted Transaction
spooling (ATS) files, and location of the Row Information Spooling (RIS) files.
Example 7-4 shows how we changed the idle timeout and shows the modified
idle timeout.
Example 7-4 cdr modify server <server group name>
banda:/home/informix $ cdr modify server -c ban_er2 -i 700 branch1
command failed -- request denied on limited server (75)
banda:/home/informix $ cdr modify server -c nil_er1 -i 700 branch2
banda:/home/informix $ cdr list server branch2
NAME ID ATTRIBUTES
----------------------------------------------------------------------
Branch2 300 timeout=700 root=g_hq hub
Stopping and restarting a replication server
If the goal is to completely stop ER, the best way to accomplish it is to shut down
the server. However, if you need to temporarily stop ER without bringing the
server down, use the cdr stop server command. Stopping the ER server will
stop capturing data to be replicated.
% cdr stop
As demonstrated in Example 7-5, we stopped cdr from the HQ node and
checked to see if the node has been stopped from the Region1 node.g_hq.
Example 7-5 cdr stop
banda:/usr/informix/etc $ cdr stop
banda:/usr/informix/etc $ cdr list server
-----------------------------------------------------------------------
Checking whether ER on HQ node has been stoppedfrom Region1 node:
informix@nile:~> cdr list server
SERVER ID STATE STATUS QUEUE CONNECTION CHANGED
-----------------------------------------------------------------------
g_hq 100 Active Dropped 0 Sep 28 15:12:28
g_branch1 101 Active Connected 0 Sep 28 11:49:16
g_region1 300 Active Local 0
g_branch2 301 Active 0

Get Informix Dynamic Server V10: Superior Data Replication for Availability and Distribution now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.