分类: Oracle
2014-10-10 14:49:38
Oracle GoldenGate安装配置
1 简介
Oracle Golden Gate软件是一种基于日志的结构化数据复制备份软件,它通过解析源数据库在线日志或归档日志获得数据的增量变化,再将这些变化应用到目标数据库,从而实现源数据库与目标数据库同步。Oracle Golden Gate可以在异构的IT基础结构(包括几乎所有常用操作系统平台和数据库平台)之间实现大量数据亚秒一级的实时复制,从而在可以在应急系统、在线报表、实时数据仓库供应、交易跟踪、数据同步、集中/分发、容灾、数据库升级和移植、双业务中心等多个场景下应用。同时,Oracle Golden Gate可以实现一对一、广播(一对多)、聚合(多对一)、双向、点对点、级联等多种灵活的拓扑结构
2 GoldenGate安装
2.1 GoldenGate的获取
Oracle GoldenGate(下文简称ogg)软件可以通过ORACLE官方网站进行下载,根据ORACLE的版本及操作系统来下载对应版本的ogg,官方下载地址:
.
ogg安装非常简单,一般使用oracle数据库安装时的用户安装ogg软件。需在源数据库和目标数据库服务器上运行以下步骤:
1.上传文件fbo_ggs_Linux_x64_ora11g_64bit.tar 到两台数据库服务器的/home/oracle目录下面
su - oracle
mkdir ogg
mv fbo_ggs_Linux_x64_ora11g_64bit.tar ./ogg
cd ogg
tar xf fbo_ggs_Linux_x64_ora11g_64bit.tar
2、 进入/oracle/ogg目录,运行./ggsci,进入ogg管理控制台在ogg控制台输入命令:
# GGSCI (localhost.localdomain) 1> create subdirs
--让ogg创建其需要用到的目录
生成的相关目录及运行程序说明:
Parameter files /home/oracle/ogg/11.2/dirprm -- 参数文件保存
目录,如MGR管理进程
Report files /home/oracle/ogg/11.2/dirrpt -- 报告文件保存
目录,OGG主要诊断手段之一,使用view report
#GroupName查看报告
Checkpoint files /home/oracle/ogg/11.2/dirchk -- 由Extract(抽
取)或Replicat(应用)进程产生对应的CHECKPOINT文
件,记录当前读写的位置
Process status files /home/oracle/ogg/11.2/dirpcs -- 进程状态文件
保存目录,记录当前运行进程的状态,进程名以大写
显示扩展名为pcm表示管理进程,pcr表示replicat进
程,pce表示为extract进程
SQL script files /home/oracle/ogg/11.2/dirsql -- SQL脚本保存
目录
Database definitions files /home/oracle/ogg/11.2/dirdef -- 由DEFGEN生成
的数据库结构定义文件保存目录,主要用于异构数据
库
Extract data files /home/oracle/ogg/11.2/dirdat -- TRAIL文件和
Extract(抽取)进程产生的文件默认目录
Temporary files /home/oracle/ogg/11.2/dirtmp -- 由CACHE管理
器分配,用于保存事务数据的目录
Stdout files /home/oracle/ogg/11.2/dirout -- 未使用,一般
用于DISCARD文件保存
GGSCI> exit //退出ogg管理控制台
3、 mkdir discard //手工在ogg目录下创建discard文件夹,
通过上述步骤,ogg就安装成功了。
4、 配置操作系统环境变量(请确保环境变量配置了ORACLE_HOME和ORACLE_SID)
$ vi ~/.bash_profile
export LD_LIBRARY_PATH=/home/oracle/ogg:$ORACLE_HOME/lib
$ source ~/.bash_profile //生效配置
5. 配置环境变量NLS_LANG(不配置中文同步会乱码,一般在安装oracle时已经配置)
首先在oracle中查询
select userenv( 'language') from dual;
然后将查询的结果配置到linux环境变量中
如export NLS_LANG=” SIMPLIFIED CHINESE_CHINA.ZHS16GBK”
6 在两台数据库服务器上运行如下sql语句,建立ogg数据库用户。
sqlplus / as sysdba
CREATE USER ogg IDENTIFIED BY geogg default tablespace users temporary tablespace temp;
GRANT UNLIMITED TABLESPACE TO ogg;
GRANT CONNECT TO ogg;
GRANT RESOURCE TO ogg;
GRANT DBA TO ogg;
进入ogg控制台,测试用户是否成功登录数据库
GGSCI> dblogin userid ogg Password geogg
Successfully logged into database.
GGSCI>exit
7 双向复制的配置
ogg相关进程的一些概念:
Manager:ogg所有服务必须依赖Manager,Manger如同ogg的总调度。
Extract :ogg用来获取源数据库数据更新的,将变更的数据发送到目标数据库
Replicat :ogg用来接收源数据库的更新,一旦源数据库Extract将数据发送过来后,Replicat会自动将更新脚本同步到目标数据库。
3.1 源和目的数据库服务器均进行如下配置
# su - oracle
# mkdir /opt/oracle/archivelog //建立新的归档日志存储位置
1、开启ORACLE归档模式,设置日志模式
[oracle@local ~]$ sqlplus / as sysdba
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database archivelog;
SQL> alter database force logging;
SQL> alter database add supplemental log data;
当数据库启用了补充日志(supplemental logging),每一条update 语句写redo 的时候会附加列值唯一信息
1. 如果表定义了主键,则主键值会随同被更新列一起做为update 语句的一部分,以便执行时区别哪些列应该被更新。
2. 如果没有主键,则非空的唯一索引/约束会随同被更新列做为update 语句的一部分,以便执行时区分哪些列应该被更新,如果该表有多个唯一索引/约束,则oracle 自动选择最短的那个。
3. 如果表即无主键,也没有定义唯一索引/约束,所有可定长度的列连同被更新列作为update 语句的一部分。更明确的话,可定长度的列是指那些除:long,lob,long raw,object type,collection 类型外的列。(停止supplemental log的命令
SQL> alter database drop supplemental log data)
某个表上的列数量较多时且没有主键或唯一索引和非空约束的情况下,开启补全日志可能导致重做日志总量大幅提高。
回收站功能会影响同步,需要关闭回收站(11g以后版本可以允许)
SQL>alter session set recyclebin=off;
SQL>alter system set recyclebin=off DEFERRED;
调整归档日志存储位置
SQL> alter database flashback off;
SQL> alter system set db_recovery_file_dest='';
SQL> alter system set log_archive_dest_1='location=/opt/oracle/archivelog';
SQL> shutdown immediate
SQL> startup
检查各项设置是否正确
SQL> select log_mode,supplemental_log_data_min,force_logging from v$database;
SQL> archive log list;
SQL> show parameter recyclebin
SQL> show parameter arch
SQL> select FLASHBACK_ON from v$database;
归档日志维护(非常重要,否则数据库日志区一旦满,数据库会停止工作)
在删除归档日志后,必须用RMAN维护控制文件,否则空间显示仍然不释放。删除截止到前一天的所有archivelog,加入以下内容.
# vi /hoem/oracle/rman.cmd
connect target /
crosscheck archivelog all;
delete noprompt expired archivelog all;
delete noprompt archivelog all completed before 'SYSDATE - 1';
vi /hoem/oracle/rman.sh
#!/bin/bash
cd /home/oracle/
rman cmdfile=rman.cmd msglog=rman.log
chmod 744 /hoem/oracle/rman.cmd /hoem/oracle/rman.sh
# crontab -e 加入以下内容:
0 1 * * * /home/oracle/rman.sh > /dev/null 2>&1
在ogg的安装目录下登陆sqlplus,使用sys登陆sqlplus,然后执行如下配置
[oracle@local ~]$ sqlplus / as sysdba
SQL> @marker_setup.sql //配置DDL复制。输入 GoldenGate数据库用户 :ogg
SQL> @ddl_setup.sql //配置DDL复制。输入 GoldenGate数据库用户 :ogg
SQL> @role_setup.sql
SQL> grant GGS_GGSUSER_ROLE to ogg;
SQL> @ddl_enable.sql
SQL> exit
4、登陆ogg控制台,设置需要进行同步GEDB用户的表
GGSCI (local) 1> dblogin userid ogg Password geogg
GGSCI (local) 1> add trandata GEDB.*
5、配置ogg manager&启动manager(配置界面操作类似vi)
GGSCI (local) 1> edit param mgr
PORT 7809
DYNAMICPORTLIST 7809-7909
AUTOSTART ER *
AUTORESTART ER *, WAITMINUTES 2, RETRIES 5
PURGEOLDEXTRACTS ./dirdat/*,usecheckpoints
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45
MANAGER进程参数配置说明:
PORT:指定服务监听端口,默认端口为7809
DYNAMICPORTLIST:动态端口:可以制定最大256个可用端口的动态列表,当指定的端
口不可用时,管理进程将会从列表中选择一个可用的端口,源端和目标段的
Collector、Replicat、GGSCI进程通信也会使用这些端口;
COMMENT:注释行,也可以用--来代替;
AUTOSTART:指定在管理进程启动时自动启动哪些进程;
AUTORESTART:自动重启参数设置:本处设置表示每3分钟尝试重新启动所有EXTRACT进程,共尝试5次;
PURGEOLDEXTRACTS:usecheckpoints: Use USECHECKPOINTS to
purge when all processes are finished with a file as
indicated by checkpoints.
minkeepdays 3:设置表示对于超过3天的trail文件进行删除。
LAGREPORT、LAGINFO、LAGCRITICAL:
定义数据延迟的预警机制:本处设置表示MGR进程每隔1小时检查EXTRACT的延迟情况,如果超过了30分钟就把延迟作为信息记录到错误日志中,如果延迟超过了45分钟,则把它作为警告写到错误日志中。
GGSCI (local) 1> info all (查看当前mgr状态)
GGSCI (local) 1> start manager
(启动manager,启动完后可以用info all再次查看状态)
6、 添加一个ogg extract进程,用于抽取源服务器数据
GGSCI (local) 1> add extract ext1,tranlog,begin now
(增加一个抽取进程ext1,ext1名字可以根据需要修改)
GGSCI (local) 1> add exttrail /home/oracle/ogg/dirdat/wf,extract ext1,megabytes 100
(将ext1抽取的源数据变更数据写到该文件夹。Megabytes:指定队列大小,本处设置表示100M)
GGSCI (local) 1> edit params ext1 (修改ext1的配置参数)
extract ext1
userid ogg,password geogg
rmthost <对端服务器ip>,mgrport 7809
rmttrail /home/oracle/ogg/dirdat/wf
TRANLOGOPTIONS EXCLUDEUSER ogg
ddl include all;
GGSCI (local) 1>info ext1 --查看到新添加的extract的状态
EXTRACT进程参数配置说明:
SETENV:配置系统环境变量
USERID/ PASSWORD: 指定OGG连接数据库的用户名和密码,这里使用3.4部分中创建的数据库用户OGG;
COMMENT:注释行,也可以用--来代替;
TABLE:定义需复制的表,后面需以;结尾
TABLEEXCLUDE:定义需要排除的表,如果在TABLE参数中使用了通配符,可以使用该参数指定排除掉得表。
GETUPDATEAFTERS|IGNOREUPDATEAFTERS:
是否在队列中写入后影像,缺省复制
GETUPDATEBEFORES| IGNOREUPDATEBEFORES:
是否在队列中写入前影像,缺省不复制
GETUPDATES|IGNOREUPDATES:
是否复制UPDATE操作,缺省复制
GETDELETES|IGNOREDELETES:
是否复制DELETE操作,缺省复制
GETINSERTS|IGNOREINSERTS:
是否复制INSERT操作,缺省复制
GETTRUNCATES|IGNORETRUNDATES:
是否复制TRUNCATE操作,缺省不复制;
RMTHOST:指定目标系统及其Goldengate Manager进程的端口号,还用于定义是否使用压缩进行传输,本例中的compress为压缩传输;
RMTTRAIL:指定写入到目标断的哪个队列;
EXTTRAIL:指定写入到本地的哪个队列;
SQLEXEC:在extract进程运行时首先运行一个SQL语句;
PASSTHRU:禁止extract进程与数据库交互,适用于Data Pump传输进程;
REPORT:定义自动定时报告;
STATOPTIONS:定义每次使用stat时统计数字是否需要重置;
REPORTCOUNT:报告已经处理的记录条数统计数字;
TLTRACE:打开对于数据库日志的跟踪日志;
DISCARDFILE:定义discardfile文件位置,如果处理中油记录出错会写入到此文件中;
DBOPTIONS:指定对于某种特定数据库所需要的特殊参数;
TRANLOGOPTIONS:指定在解析数据库日志时所需要的特殊参数,例如:对于裸设备,可能需要加入以下参数 rawdeviceoggset 0;EXCLUDEUSER 将同步用户进行排除,避免双向复制时循环,
WARNLONGTRANS:指定对于超过一定时间的长交易可以在gsserr.log里面写入警告信息,本处配置为每隔3分钟检查一次场交易,对于超过2小时的进行警告;
7、启动ogg extract命令 (最好等目标服务器ogg配置成功后再启动ext)
GGSCI (local) 1> start extract ext1 (等目标服务器ogg配置成功后再启动ext)
8、 添加一个ogg replicat进程,用于更新目标服务器数据
GGSCI (local) 1> edit params ./GLOBAL
GSSCHEMA OGG
CHECKPOINTTABLE OGG.checkpoint
GGSCI (local) 2> dblogin userid ogg Password geogg
GGSCI (local) 3> add checkpointtable ogg.checkpoint
GGSCI (local) 4> ADD replicat rep1 EXTTRAIL /home/oracle/ogg/dirdat/wf, checkpointtable ogg.checkpoint
GGSCI (local) 5> edit param rep1
replicat rep1
ASSUMETARGETDEFS
userid ogg, password geogg
handlecollisions
discardfile /home/oracle/ogg/discard/rep1_discard.txt, append, megabytes 10
DDL INCLUDE ALL
DDLERROR DEFAULT IGNORE RETRYOP
map gedb.*, target gedb.*;
GGSCI (local) 5>start replicat rep1
配置完成后可以通过info all查看到新添加的进程的状态
REPLICAT 进程参数配置说明:
ASSUMETARGETDEFS:假定两端数据结构一致使用此参数;
SOURCEDEFS:假定两端数据结构不一致,使用此参数指定源端的数据结构定义文件,
该文件需要由GlodenGate工具产生。
MAP:用于指定源端与目标端表的映射关系;
MAPEXCLUDE:用于在MAP中使用*匹配时排除掉指定的表;
REPERROR:定义出错以后进程的响应,一般可以定义为两种:
ABEND,即一旦出现错误即停止复制,此为缺省配置;
DISCARD,出现错误后继续复制,只是把错误的数据放到discard文件中。
DISCARDFILE:定义discardfile文件位置,如果处理中油记录出错会写入到此文件
中;
SQLEXEC:在进程运行时首先运行一个SQL语句;
GROUPTRANSOPS:将小交易合并成一个大的交易进行提交,减少提交次数,降低系统IO
消耗。
MAXTRANSOPS:将大交易拆分,每XX条记录提交一次。
HANDLECOLLISIONS:使用该参数时,即使目标数据库环境中存在
数据完整性问题(如 update、delete 操作遇到缺失行或重复的
插入操作),replicat 进程仍然能够继续处理 trail 中的数
据。如果使用了 HANDLECOLLISIONS 参数,则 replicat 进程将
按如下方式处理数据:
Missing updates are ignored.
Missing deletes are ignored.
Duplicate inserts are turned into updates.
4、启动ogg manager ,replicat命令
GGSCI (local) 1> start manager
GGSCI (local) 1> start replicat rep1
4 维护相关
4.1 OGG常用命令
1、 启动manager:start manager
2、 启动extract:start extract extn
3、 启动replicat:start replicat repn
4、 停止manager:stop manager
5、 停止 extract:stop extract extn
6、 停止replicat:stop replicat repn
7、 删除extract:delete extract extn
8、 删除replicat:delete extract repn
9、 查看ogg状态:info all
10、 修改manager参数:edit params mgr
11、 修改extract参数:edit params extn
12、 修改replicat参数:edit params repn
13、 修改全局参数:edit params ./GLOBAL
14 查看ext进程报告 view report ext1
15 查看ext进程 info extract ext1
4.2 OGG日志路径
$OGG_HOME/ggserr.log
4.3 OGG开机自启
操作系统设置:
1、用oracle用户建立/home/oracle/ogg/startmgr.txt,文件内容如下:
start mgr
info all
exit
2、chmod 744 startmgr.txt
3、用oracle用户建立/home/oracle/ogg/startmgr.sh,文件内如下:
/home/oracle/ogg/ggsci paramfile /home/oracle/ogg/startmgr.txt > /home/oracle/ogg/startmgr.log
4、chmod x startmgr.sh
5、用root用户编辑 /etc/rc.local ,添加如下信息:
su - oracle -c "/home/oracle/ogg/startmgr.sh"
4.4 告警信息处理
GoldenGate的Extract虽然提示OGG-01423告警,但却可以通过新的API成功访问到归档日志,因此可以忽略Extract的OGG-01423告警
DDL参数语法说明
在配置DDL复制时,需要在Extract 和Replicat 进程的配置文件里添加ddl属性。下面简要介绍下这个属性的常用参数,参考至《OGG Windows and UNIX Reference Guide》,
DDL语句包含的主要语法如下:
DDL [
{INCLUDE | EXCLUDE}
[, MAPPED | UNMAPPED | OTHER | ALL]
[, OPTYPE
[, OBJTYPE ‘
[, OBJNAME “
[, INSTR ‘
[, INSTRCOMMENTS ‘
]
[...]
{INCLUDE | EXCLUDE}
Use INCLUDE and EXCLUDE to identify the beginning of an inclusion or exclusion clause.
(1) An inclusion clause containsfiltering criteria that identifies the DDL that this parameter will affect.
(2) An exclusion clause containsfiltering criteria that excludes specific DDL from this parameter.
The inclusion orexclusion clause must consist of the INCLUDE or EXCLUDE keyword followed by anyvalid combination of other options of the parameter that is being applied.
If you use EXCLUDE, you must create acorresponding INCLUDE clause.
--如果要使用Exclude,那么必须先指定include。
For example, the following is invalid:
DDL EXCLUDE OBJNAME “hr.*”
--这种语法是错误的。
However, you can use either of thefollowing:
DDL INCLUDE ALL,EXCLUDE OBJNAME “hr.*”
DDL INCLUDE OBJNAME “fin.*” EXCLUDE “fin.ss” --正确语法
An EXCLUDE takes priority over any INCLUDEs that contain the same criteria. You can use multipleinclusion and exclusion clauses.
[, MAPPED | UNMAPPED | OTHER | ALL]
Use MAPPED, UNMAPPED,OTHER, and ALL to apply INCLUDE or EXCLUDE based on the DDL operation scope.
1、MAPPED applies INCLUDE or EXCLUDE to DDL operations that are of MAPPED scope. MAPPED filtering is performed before filtering that is specified with other DDL parameter options.
2、UNMAPPED applies INCLUDE or EXCLUDE to DDL operations that are of UNMAPPED scope.
3、OTHER applies INCLUDE or EXCLUDE to DDL operations that are of OTHER scope.
4、ALL applies INCLUDE or EXCLUDE to DDL operations of all scopes.
关于这四种scope的具体范围详见官方文档《OGG Windows and UNIX Reference Guide》
OPTYPE
Use OPTYPE toapply INCLUDE or EXCLUDE to a specific type of DDL operation, such as CREATE, ALTER,and RENAME. For
For example, to include ALTER operations,the correct syntax is:
DDL INCLUDE OPTYPE ALTER
OBJTYPE‘
Use OBJTYPE to apply INCLUDE or EXCLUDE to a specific type of database object. For
For example:
DDL INCLUDE OBJTYPE ‘INDEX’
DDL INCLUDE OBJTYPE ‘SNAPSHOT’
For Oracle object type USER, do not use the OBJNAME option, because OBJNAME expects “owner.object” whereas USER only has aschema.
OBJNAME“
Use OBJNAME toapply INCLUDE or EXCLUDE to the fully qualified name of an object, for example owner.table_name.This option takes a doublequoted string as input. You can use a wildcard onlyfor the object name.
Example:
DDL INCLUDE OBJNAME “accounts.*”
Do not use OBJNAME for the Oracle USER object,because OBJNAME expects “owner.object” whereas USER only has a schema.
When using OBJNAMEwith MAPPED in a Replicat parameter file, the value for OBJNAME must refer tothe name specified with the TARGET clause of the MAP statement. For example,given the following MAP statement, the correct value is OBJNAME “fin2.*”.
MAP fin.exp_*,TARGET fin2.*;
In the following example, a CREATE TABLE statementexecutes like this on the source:
CREATE TABLE fin.exp_phone;
And like this on the target:
CREATE TABLE fin2.exp_phone;
If a target owner is not specified in the MAP statement, Replicat maps it to the database user that is specified with the USERID parameter.
For DDL that creates triggers, synonyms, and indexes, the value for OBJNAME must be the name of the base object, not the name of the trigger, synonym, or index.
For example, to include the following DDL statement, the correct value is “hr.accounts,” not “hr.insert_trig.”
CREATE TRIGGER hr.insert_trig ON hr.accounts;
For RENAME operations,the value for OBJNAME must be the new table name. For example, to include the following DDL statement, the correct value is “hr.acct.”
ALTER TABLE hr.accounts RENAME TO acct;
The following is an example of how tocombine DDL parameter options.
DDL &
INCLUDE UNMAPPED &
OPTYPE alter &
OBJTYPE ‘table’ &
OBJNAME users.tab* &
INCLUDE MAPPED OBJNAME * &
EXCLUDE MAPPED OBJNAME temporary.tab"
GoldenGate 基本参数含义
1. edit params命令
2. DBLOGIN USERID
3. ADD TRANDATA命令
4. ADD EXTRACT 命令
5. ADD EXTTRAIL命令
6. EXTFILESOURCE
7. ADD RMTTRAIL命令
8. ADD REPLICAT命令
9. PURGEOLDEXTRACTS
10. AUTOSTART参数
11. DYNAMICRESOLUTION
12. SOURCEDB
13. PASSTHRU
14. ASSUMETARGETDEFS
15. REPERROR
16. 使用通配符
(1) Overview of Extract
The Extract process runs on the source system and is the capture mechanism of
GoldenGate. You can configure Extract in one of the following ways:
● Initial loads: For initial data loads, Extract extracts a current set of data directly from
their source objects.
● Change synchronization: To keep source data synchronized with another set of data,
Extract extracts transactional changes made to data (inserts, updates, and deletes)
after the initial synchronization has taken place. DDL changes and sequences are also
extracted, if supported for the type of database being used.
(2) Overview of Replicat
The Replicat process runs on the target system. Replicat reads extracted data changes and
DDL changes (if supported) that are specified in the Replicat configuration, and then it
replicates them to the target database. You can configure Replicat in one of the following
ways:
(3) Overview of trails
To support the continuous extraction and replication of supported database changes,
GoldenGate stores those changes temporarily on disk in a series of files called a trail. A
trail can exist on the source or target system, or on an intermediary system, depending on
how you configure GoldenGate. On the local system it is known as an extract trail (or local
trail). On a remote system it is known as a remote trail.
By using a trail for storage, GoldenGate supports data accuracy and fault tolerance (see
“Overview of checkpoints” on page 28). The use of a trail also allows extraction and
replication activities to occur independently of each other. With these processes separated,
you have more choices for how data is delivered. For example, instead of extracting and
replicating changes continuously, you could extract changes continuously but store them
in the trail for replication to the target later, whenever the target application needs them.
1. edit params命令
==================
Use EDIT PARAMS to create or change a parameter file. By default,
this command launches Microsoft Notepad on Windows or the vi editor
on UNIX systems. You can change the editor with the SET EDITOR
command.
Syntax:
EDIT PARAMS {MGR |
MGR
Opens a parameter file for the Manager process.
Opens a parameter file for the specified Extract or Replicat group.
Opens the specified file. Use the full path name.
Example 1: EDIT PARAMS finance
Example 2: EDIT PARAMS c:\lpparms\replp.prm
GGSCI (testdb11.zhyhl.com) 6>
PORT
PORT defines the port number on which Manager runs on the local system. The default port
is 7809. You must specify either the default port or another port. The port must be
unreserved and unrestricted. GGSCI uses this port to request Manager to start processes.
The Extract process uses this port to request Manager to start a remote Collector process
or an initial-load Replicat process. PORT is the only required Manager parameter.
Autostart parameters
Use the AUTOSTART parameter to start Extract and Replicat processes when Manager starts.
This can be useful, for example, if you want GoldenGate activities to begin immediately
when you start the system, assuming Manager is part of the startup routine. You can use
multiple AUTOSTART statements in the same parameter file.
AUTOSTART {ER | EXTRACT | REPLICAT} {group name | wildcard}
Use the AUTORESTART parameter to start Extract and Replicat processes again after
abnormal termination.
AUTORESTART {ER | EXTRACT | REPLICAT} {group name | wildcard}
[, RETRIES
[, WAITMINUTES
[, RESETMINUTES
2. DBLOGIN USERID
=============================================
dblogin userid test,password test
DBLOGIN USERID
Where:
supplemental logging, and
3. ADD TRANDATA命令
===================
Use the ADD TRANDATA command in GGSCI to configure the database to log the key values
whenever it logs a row change, so that they are available to GoldenGate in the redo record.
By default, the database only logs column values that are changed.
ADD TRANDATA must be performed before you start GoldenGate processing.
add trandata test.*
To capture key values with ADD TRANDATA
ADD TRANDATA