1.Prepare the SQLHOSTS files
grp1 group - - i=1
server1 onsoctcp host port g=grp1
grp2 group - - i=2
server2 onsoctcp host port g=grp2

2.Prepare the ER disk space
A: onconfig : CDR_QDATA_SBSPACES sbs1
B: start the engine .
C: touch /ids/chunks/sbs1_chunk1
chmod 660 /ids/chunks/sbs1_chunk1
onspaces -c -S sbs1 -p /ids/chunks/sbs1_chunk1 -s 100000 -o 0

3.Add the nodes to a new ER domain
on server1 , 執行以下指令:
cdr define server --init grp1
on server2 , 執行以下指令:
cdr define server --sync=grp1 --init grp2

4.Prepare the table to replicate
在 server1 and server2 ,執行以下指令:
CREATE DATABSE db1 WITH LOG;
CREATE TABLE employees(id int primary key, ...);

5.Create the replicate
在server1,執行:
cdr define replicate --conflict=ignore r_employees \
"db1@grp1:informix.employees" "select * from employees" \
"db1@grp2:informix.employees" "select * from employees"

6.Start the replicate
在任一部主機執行:
cdr start replicate r_employees

hedgezzz 發表在 痞客邦 留言(0) 人氣()