target节点:
GGSCI (oracleogg) 14> edit params ./GLOBALS --创建GLOBALS参数后必须退出
CHECKPOINTTABLE system.ggchecktable
GGSCI (oracleogg) 2> dblogin userid system, password system
Successfully logged into database.
GGSCI (oracleogg) 3> add checkpointtable
No checkpoint table specified, using GLOBALS specification (system.ggchecktable)...
Successfully created checkpoint table system.ggchecktable.
GGSCI (oracleogg) 4> add replicat roraaa, exttrail ./dirdat/aa
REPLICAT added.
GGSCI (oracleogg) 5> edit params roraaa
REPLICAT RORAAA
USERID gguser, PASSWORD "system"
HANDLECOLLISIONS
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/RORAAA.DSE, PURGE
MAP gguser.t, TARGET gguser.t;
GGSCI (oracleogg) 8> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING RORAAA 00:00:00 00:00:05
GGSCI (oracleogg) 9>
9.验证数据实时更新
source节点:
SQL> select * from t;
A B
---------- ----------
1 a
2 b
3 c
4 d
SQL> insert into t values(5,'e');
1 row created.
SQL> commit;
Commit complete.
SQL> select * from t;
A B
---------- ----------
1 a
2 b
3 c
4 d
5 e
SQL>
target节点:
SQL> select * from t;
A B
---------- ----------
4 d
5 e
1 a
2 b
3 c
SQL>