4. 查看延时,以及文件抽取应用情况
GGSCI> lag <进程名称> 可以查看详细的延时信息。
例如:
GGSCI (db4) 11> lag rep1
Sending GETLAG request to REPLICAT REP1 …
No records yet processed.
At EOF, no more records to process.
看到At EOF, no more records to process.表名所有的抽取都已经应用完毕
18.使用shell脚本
gdora@orclcs ggs]$ cat /home/gdora/ggs/yzhq.txt
status manager
status mgr
[gdora@orclcs ggs]$
Using UNIX batch and shell scripts
On a UNIX system, you can issue GoldenGate commands from a script such as a startup
script, shutdown script, or failover script by running GGSCI and calling an input file. Use
the following syntax:
ggsci < <input_file>
[gdora@orclcs ggs]$ ggsci < yzhq.txt
GoldenGate Command Interpreter for Oracle
Version 10.4.0.12 Build 001
Linux, x86, 32bit (optimized), Oracle 10 on Aug 21 2009 14:34:04
Copyright (C) GoldenGate Software, Inc. 1995-2009.
The GoldenGate software may include other code written by third parties;
details regarding such third party code, including applicable copyright,
legal and licensing notices are available at http://support.goldengate.com.
GGSCI (orclcs.zhyhl.com) 1>
Manager is running (IP port orclcs.zhyhl.com.7809).
GGSCI (orclcs.zhyhl.com) 2>
Manager is running (IP port orclcs.zhyhl.com.7809).
实现双向复制,一般用于双业务中心环境下在实际应用中。双向复制(DDL+DML)面临着许多问题,主要有如下几点:
1. 如果两个库同时更新同一条记录如何处理?调整业务规则
2. 如果网络出现失败如何处理?支持断点续传
3. 如果数据不同步后如何修复?导出源端,导入目标端
总结:
双向复制避免数据冲突是难点,解决这个难点根本还是调整业务:
a) 只在一端开展业务
b) 两端开展不同业务,涉及不同数据集
c) 两端开展相同业务,但依据地域或其他条件对数据予以区分,两边不操作同一条数据