GoldenGate学习7–其它问题

1.truncate操作要单独处理,在EXTRACT和REPLICAT配置文件中添加GETTRUNCATES;
2.主键的解决办法:一个生成奇数,一个生成偶数
Database-generated values
Do not replicate database-generated sequential values in a bi-directional configuration.
The range of values must be different on each system, with no chance of overlap. For
example, in a two-database environment, you can have one server generate even values,
and the other odd. For an n-server environment, start each key at a different value and
increment the values by the number of servers in the environment. This method may not
be available to all types of applications or databases. If the application permits, you can
add a location identifier to the value to enforce uniqueness.

阻止数据循环
1.阻止抽取复制的操作:
1.GETAPPLOPS|IGNOREAPPLOPS
2.GETREPLICATES|IGNOREREPLICATES
2.标识复制的事务:
TRANLOGOPTIONS EXCLUDEUSER
TRANLOGOPTIONS EXCLUDEUSERID

中间主键冲突了怎么办;
主库宕机了,剩余数据是否会同步到备机;

mgr
PURGEOLDEXTRACTS /opt/gg/trails/w1*, USECHECKPOINTS, MINKEEPFILES 10
PURGEOLDEXTRACTS /opt/gg/trails/w2*, USECHECKPOINTS, MINKEEPFILES 10
AUTORESTART ER *, RETRIES 3, WAITMINUTES 5
PURGEDDLHISTORY MINKEEPDAYS 3, MAXKEEPDAYS 5, FREQUENCYMINUTES 30
PURGEMARKERHISTORY MINKEEPDAYS 3, MAXKEEPDAYS 5, FREQUENCYMINUTES 30

init data on soruce
1.add extract eintss, soruceistable
2.edit params eintss
EXTRACT eintss
userid system, password “oracle”
rmthost xxx, mgrport 7809
rmttask replicat, group riniss
table gg.*;

init data on target
3. add replicat riniss, specialrun
info replicat *, tasks;
4.edit params riniss
replicat riniss
assumetargetdefs
userid system, password oracle
discardfile ./dirrpt/RINISS.dsc, purge
map gg.*, target gg.*;

on source
5.start extract einiss;
view report einitss;
6.view report riniss

source 2 target on source
1.ADD EXTRACT ext_s2t, TRANLOG, BEGIN NOW, THREADS 1
EXTRACT ext_s2t
USERID system, PASSWORD oracle
EXTTRAIL ./dirdat/st
DLL INCLUDE MAPPED
TABLE gg.*;

2.ADD EXTTRAIL ./dirdat/st, EXTRACT ext_s2t

3.ADD EXTRACT pump_sr, EXTTRAILSOURCE ./dirdat/st, BEGIN NOW
EXTRACT pump_sr
USERID system, PASSWORD oracle
RMTHOST 192.168.10.12, MGRPORT 7809
RMTTRAIL ./dirdat/tt
PASSTHRU

TABLE gg.*;

4.ADD RMTTRAIL ./dirdat/tt, EXTRACT pump_sr

source 2 target on target
5.ADD REPLICAT repl_tt, EXTTRAIL ./dirdat/tt, BEGIN NOW
REPLICAT repl_tt
ASSUMETARGETDEFS
DLL INCLUDE MAPPED
USERID system, PASSWORD oracle
DISCARDFILE ./dirrpt/repl_tt.dsc, PURGE
MAP gg.*, TARGET gg.*;

————————————————————-
target 2 source on target
1.ADD EXTRACT ext_t2s, TRANLOG, BEGIN NOW, THREADS 1
EXTRACT ext_t2s
USERID system, PASSWORD oracle
EXTTRAIL ./dirdat/ts
DLL INCLUDE MAPPED
TABLE gg.*;

2.ADD EXTTRAIL ./dirdat/ts, EXTRACT ext_t2s

3.ADD EXTRACT pump_tt, EXTTRAILSOURCE ./dirdat/ts, BEGIN NOW
EXTRACT pump_tt
USERID system, PASSWORD oracle
RMTHOST 192.168.10.11, MGRPORT 7809
RMTTRAIL ./dirdat/ss
PASSTHRU
TABLE gg.*;

4.ADD RMTTRAIL ./dirdat/ss, EXTRACT pump_tt

target 2 source on srouce
5.ADD REPLICAT repl_ss, EXTTRAIL ./dirdat/ss, BEGIN NOW
REPLICAT repl_ss
ASSUMETARGETDEFS
DLL INCLUDE MAPPED
USERID system, PASSWORD oracle
DISCARDFILE ./dirrpt/repl_ss.dsc, PURGE
MAP gg.*, TARGET gg.*;

冲突的现象
1.插入时主键冲突
2.更新/删除冲突

解决的办法:
1.读写分离
2.设置很小的延迟,A操作的更改在B操作的更改完成之前反应到B的话就避免了冲突;

使用gg的CDR(Conflict Detection and Resolution)特性
1.解决插入时主键冲突
2.更新/删除时找不到数据;

约束:数据库必须在同类的OS平台上,只支持可以比较而且是没有显式转换的数据类型

GoldenGate学习6–Oracle到SQLServer数据同步

1.相关环境;
Oracle:11.2.0.1 on Linux x64
SQLServer:2005 on Windows 2008R2 x64
OGG:12.1.2.1.0

2.准备源端(Oralce端);
2.1开启数据库级别附加日志;
SELECT supplemental_log_data_min, force_logging FROM v$database;
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
SQL> ALTER DATABASE FORCE LOGGING;
SELECT supplemental_log_data_min, force_logging FROM v$database;
SQL> ALTER SYSTEM SWITCH LOGFILE;
2.2创建用户并授权;
CREATE USER ggadm IDENTIFIED BY ‘********’;
EXEC dbms_goldengate_auth.grant_admin_privilege(‘ggadm’); for Oracle 11.2.0.4 and later
EXEC dbms_goldengate_auth.grant_admin_privilege(‘ggadm’,grant_select_privileges=>true); for Oracle 11.2.0.3 or Earlier
2.3开启相关参数;
ALTER SYSTEM SET ENABLE_GOLDENGATE_REPLICATION=true; for an Oracle 11.2.0.4 or greated database
2.4在ogg中配置安全认证;
./ggsci
ADD CREDENTIALSTORE
ALTER CREDENTIALSTORE ADD USER ggadm, PASSWORD ******** ALIAS alias ogg
2.5开启表级别附加日志(可选);
./ggsci
DBLOGIN USERIDALIAS ogg
ADD TRANDATA [container.]schema.table
INFO TRANDATA [container.]schema.table

3.配置表结构映射;
3.1在源端定义需要映射的表;
./ggsci
EDIT PARAM DEFGEN
DEFSFILE ./dirdef/source.def, PURGE
USERIDALIAS alias
TABLE schema.table1;
TABLE schema.table1;
3.2生成映射文件;
shell> defgen paramfile ./dirprm/defgen.prm
3.3拷贝文件到目标端相应的目录;

4.在源端和目标端分别开启管理进程;
EDIT PARAMS mgr

PORT 7809

START mgr
INFO mgr

5.在源端配置数据泵抽取(Data Pump Extract)进程;
ADD EXTRACT EXT1, TRANLOG, BEGIN NOW, THREADS 1
EDIT PARAMS ext1

EXTRACT ext1
USERIDALIAS ogg
RMTHOST dst_ip, MGRPORT 7809 ENCRYPT AES192, KEYNAME securekey2
RMTTRAIL ./dirdat/rt
# SEQUENCE schema.sequence_name;
TABLE schema.table;

ADD RMTTRAIL ./dirdat/rt, EXTRACT ext1, MEGABYTES 100;
INFO RMTTRAIL *

# START EXTRACT ext1
# INFO EXTRACT ext1, DETAIL

6.配置目标端(SQLServer端);
6.1配置ODBC数据源:控制面板->管理工具->数据源(ODBC)->系统DSN(添加),择驱动程序类型为[SQL Server Native Client],比如:名字为ogg;
6.2在目标端创建一样的表结构;
6.3添加检查点表;
./ggsci
EDIT PARAMS ./GLOBALS

CHECKPOINTTABLE ggschkpt

DBLOGIN SOURCEDB ogg, USERID uid, PASSWORD pwd
ADD CHECKPOINTTABLE
退出之后再进一次客户端;
6.4在目标端配置复制(Change Delivery)进程;
ADD REPLICAT rpl1, EXTTRAIL E:\ogg121\dirdat\rt
EDIT PARAMS rpl1

REPLICAT rpl1
TARGETDB ogg, USERID uid, PASSWORD pwd
HANDLECOLLISIONS
SOURCEDEFS E:\ogg121\dirdef\source.def
REPERROR DEFAULT, DISCARD
DISCARDFILE E:\ggate\dirrpt\rpl1.dsc APPEND
GETTRUNCATES
MAP schema.table, TARGET db.table;

# START REPLICAT rpl1
# INFO REPLICAT rpl1

7.查看对应的报告;
7.1查看抽取进程报告;
SEND EXTRACT EXT1, REPORT
VIEW REPORT EXT1
7.2查看复制进程报告;
SEND REPLICAT RPL1, REPORT
VIEW REPORT RPL1

TIPS:在Windows下安装ogg时需要注册服务;
C:\GG_DIR> INSTALL ADDSERVICE
./ggsci
CREATE SUBDIRS

GoldenGate学习5–Oracle to MySQL

GoldenGate for Oracle to MySQL
1. Environments;
1. Source Database:
1. Oracle:11g R2;
2. Ip Address:192.168.10.11;
3. Hostname:primary.snda.com;
4. Oracle SID:primary;
2. Target Database:
1. Mysql:5.5.21;
2. Ip Address:192.168.10.55;
3. Hostname:master.snda.com;
2. Oracle to Mysql configuration;
3. Prepare the Environment;
1. Description:
1. The GoldenGate software must be installed on both the source and target systems;
2. The installation includes a sample database and scripts to generate initial data as well as subsequent update operations;
3. The source and target tables are created and loaded with initial data;
4. the GoldenGate Manager processes are also started so that other processes may be configured and started;
2. Prepare the Oracle source environment:
1. 在源数据库创建gg用户,并赋予一定的权限:create user gg identified by gg default tablespace example;grant connect, resource to gg;(一定要保证表/表空间是logging的,select table_name, tablespace_name, logging, owner from dba_tables where owner=’GG’;)
2. 在源数据库的gg用户下创建测试使用的表(脚本是GoldenGate安装目录下的demo_ora_create.sql文件);
3. 在源数据库的测试表中添加测试数据(脚本是GoldenGate目录下的demo_ora_insert.sql文件);
4. Add supplemental logging;
5. Configure the Manager process on the source;
3. Prepare the Mysql target environment:
1. 准备数据;
2. Configure the Manager process;
3. create a user;
4. Configure Initial Data Load using Direct Load;
1. Initial Load Methods:
1. Oracle GoldenGate Methods;
2. Database-specific Methods:
1. Backup/Restore;
2. Export/Import;
3. SQL scripts;
4. Break mirror;
5. Transportable tablespaces;
6. Note:
1. Run a test initial load early on for timing and sizing;
2. Run the actual initial load after starting change capture on the source;
3. Current use;
2. Initial data capture on source:
1. add the initial load capture batch task group:GGSCI> add extract eint, sourceistable;(sourceistable 参数代表这是initial data);
2. configure the initial load capture parameter file:GGSCI> edit params eint
;
3. Initial data delivery on target:
1. add the initial load delivery batch task:GGSCI>add replicat rini
, specialrun;(specialrun:Create a Replicat special run as a task)
2. configure the initial load delivery parameter file;(assumetargetdefs:假定目标数据库和源数据库表结构一致;discardfile:失败的记录记录的文件;)
4. Define the source.def:
1. 定义defgen参数文件;
2. 执行定义参数文件:dengen paramfile ./dirprm/defgen.prm,会生成表结构定义文件./dirdef/source.def;
3. 拷贝到目标数据库相应的目录下;
5. Execute the initial load process:
1. start extract process:start extract eini
;
2. view the results on the target system:view report rini
;
3. 在目标数据库中查看数据;
5. Configure Change Capture(online mode);
1. Extract can be configured to:
1. Capture changed data from database logs;
2. Capture data directly from source tables for initial data load;
3. Write the data to a local or remote trail or file;
2. add the extract group:add extract emsq
, tranlog, begin now, threads ;
3. create the extract parameter file;
4. define the GoldenGate trail:add rmttrail ./dirdat/, extract emsq, megabytes 5;(default 10M size)
5. start the capture process:start extract eora
;
6. 可以通过view report eorasd查看日志;
6. Configure Change Delivery;
1. set up the checkpoint table;
1. create a GLOBALS file on the target system;(exit and save)
2. activate the GLOBALS parameters;
2. Configure Change Delivery;
1. add the replicat group;
2. create replicat parameter file;
3. start the replicat process;
7. Generate Activity and Verify the Results;
1. exceute miscellaneous update, insert and delete operations on source system;
2. verify results on the source system;
3. verify results on the target system;
4. turn off error handling;
8. Parameter Files Knowlege:
1. Editing Parameter Files:
1. Edit parameter files to configure GoldenGate processes;
2. The GLOBALS parameter file is identified by its file path:GGSCI>edit params ./GLOBALS;
3. Manager and utility parameter files are identified by keywords:GGSCI>edit params mgr/defgen;
4. Extract and Replicat parameter files are identified by the process groiup name:GGSCI>edit params ;
2. GLOBALS Versus Process Parameters:
1. GLOBALS parameter apply to all processes:
1. set when Manager starts;
2. reside in /GOLBALS;
2. Process parameters apply to a specific process(Manager, Extract, Server Collector, Replicat, Utilities):
1. set when the process starts;
2. override GOLBALS settings;
3. reside by defaults in the dirprm directory in files named .prm;
4. most apply to all tables processed but some can be specified at the table level;
3.
GLOBALS Parameters:
1. Control things common to all processes in a GoldenGate instance;
2. Can be overridden by parameters at the process level;
3. Must be created before any processes are started;
4. Must exit GGSCI to save;
5. Once set, rarely changed;
6. MGRSERVNAME:defines a unique Manager service name;
7. CHECKPOINTTABLE:Defines the table name used for Replicat’s checkpoint table;

GoldenGate学习4–Oracle to Oracle workshop demonstration

GoldenGate for Oracle to Oracle
1. Environments;
1. Source Database:
1. Oracle:11g R2;
2. Ip Address:192.168.10.11;
3. Hostname:ggsource.snda.com;
4. Oracle SID:ggsource;
2. Target Database:
1. Oracle:11g R2;
2. Ip Address:192.168.10.12;
3. Hostname:ggtarget.snda.com;
4. Oracle SID:ggtarget.snda.com;
2. Oracle to Oracle configuration;
3. Prepare the Environment;
1. Description:
1. The GoldenGate software must be installed on both the source and target systems;
2. The installation includes a sample database and scripts to generate initial data as well as subsequent update operations;
3. The source and target tables are created and loaded with initial data;
4. the GoldenGate Manager processes are also started so that other processes may be configured and started;
2. 准备测试数据:
1. 分别在源数据库和目标数据库创建gg用户,并赋予一定的权限:create user gg identified by gg default tablespace example;grant connect, resource to gg;(一定要保证表是logging的,select table_name, tablespace_name, logging, owner from dba_tables where owner=’GG’;)
2. 分别在源数据库和目标数据库的gg用户下创建测试使用的表(脚本是GoldenGate安装目录下的demo_ora_create.sql文件);
3. 只在源数据库的测试表中添加测试数据(脚本是GoldenGate目录下的demo_ora_insert.sql文件);
3. Configure the Manager process on the source and target:
1. Create the Manager parameter file;
2. Use edit to assign a port(7809 default),其实是编辑了/gg11/dirprm/mgr.prm文件;
3. Start the Manager and View the Manager process;
4. 查看后台进程验证:ps -ef | grep mgr;
5. 可以通过直接打开日志文件(/gg11/dirrpt/MGR.rpt文件)或者使用view report mgr命令查看Manager的日志;
4. Supplemental Logging:
1. Add database level supplmental logging on source and target:done when GoldenGate installed;
2. Add table level supplemental logging on srouce and target;
3. Verify that supplemental logging infos;
4. Configure Initial Data Load;
1. Initial Load Methods:
1. Oracle GoldenGate Methods;
2. Database-specific Methods:
1. Backup/Restore;
2. Export/Import;
3. SQL scripts;
4. Break mirror;
5. Transportable tablespaces;
6. Note:
1. Run a test initial load early on for timing and sizing;
2. Run the actual initial load after starting change capture on the source;
3. Current use;
2. Initial data capture:
1. add the initial load capture batch task group:GGSCI> add extract eint, sourceistable;(sourceistable 参数代表这是initial data);
2. configure the initial load capture parameter file:GGSCI> edit params eint
;
3. Initial data delivery:
1. add the initial load delivery batch task:GGSCI>add replicat rini
, specialrun;(specialrun:Create a Replicat special run as a task)
2. configure the initial load delivery parameter file;(assumetargetdefs:假定目标数据库和源数据库表结构一致;discardfile:失败的记录记录的文件;)
4. Execute the initial load process:
1. start extract process:start extract eint
;
2. view the results on the target system:view report rini
;
3. 在目标数据库中查看数据;
5. Configure Change Capture(online mode);
1. Extract can be configured to:
1. Capture changed data from database logs;
2. Capture data directly from source tables for initial data load;
3. Write the data to a local or remote trail or file;
2. add the extract group:add extract eora
, tranlog, begin now, threads ;
3. create the extract parameter file;
4. define the GoldenGate trail:add rmttrail ./dirdat/, extract eora, megabytes 5;(default 10M size)
5. start the capture process:start extract eora
;
6. 可以通过view report eorasd查看日志;
6. Configure Change Delivery;
1. set up the checkpoint table;
1. create a GLOBALS file on the target system;(exit and save)
2. activate the GLOBALS parameters;
2. Configure Change Delivery;
1. add the replicat group;
2. create replicat parameter file;
3. start the replicat process;
7. Generate Activity and Verify the Results;
1. exceute miscellaneous update, insert and delete operations on source system;
2. verify results on the source system;
3. verify results on the target system;
4. turn off error handling;
8. Parameter Files Knowlege:
1. Editing Parameter Files:
1. Edit parameter files to configure GoldenGate processes;
2. The GLOBALS parameter file is identified by its file path:GGSCI>edit params ./GLOBALS;
3. Manager and utility parameter files are identified by keywords:GGSCI>edit params mgr/defgen;
4. Extract and Replicat parameter files are identified by the process groiup name:GGSCI>edit params ;
2. GLOBALS Versus Process Parameters:
1. GLOBALS parameter apply to all processes:
1. set when Manager starts;
2. reside in /GOLBALS;
2. Process parameters apply to a specific process(Manager, Extract, Server Collector, Replicat, Utilities):
1. set when the process starts;
2. override GOLBALS settings;
3. reside by defaults in the dirprm directory in files named .prm;
4. most apply to all tables processed but some can be specified at the table level;
3.
GLOBALS Parameters:
1. Control things common to all processes in a GoldenGate instance;
2. Can be overridden by parameters at the process level;
3. Must be created before any processes are started;
4. Must exit GGSCI to save;
5. Once set, rarely changed;
6. MGRSERVNAME:defines a unique Manager service name;
7. CHECKPOINTTABLE:Defines the table name used for Replicat’s checkpoint table;

GoldenGate学习3–Install Oracle GoldenGate on Linux

Oracle GoldenGate for Linux Installation
1. Objectives
1. Download an Oracle GoldenGate Media Pack;
2. Install Oracle GoldenGate on Linux, Unix and Windows;
3. Locate and use Oracle GoldenGate documentation;
4. Use the Oracle GoldenGate command interface;
2. Installation Steps:
1. Downloading Oracle GoldenGate software;
1. GoldenGate是属于Oracle的中间件,可以到www.oracle.com->Downloads菜单->Middleware下选择GoldenGate及帮助文档下载(http://www.oracle.com/technetwork/middleware/goldengate/downloads/index.html);
2. 也可以到http://edelivery.oracle.com登陆后下载;
3. 选择Media Pack:Oracle Fusion Middleware and Platform:Linux x86;
4. 选择GoldenGate软件,并选择合适的版本;
5. 如果是其他数据库(mysql,mssql,db2),应该选择;
2. Preparing the Oracle GoldenGate software;
1. 把下载的文件上传到服务器,然后解压缩:unzip ogg112101_fbo_ggs_Linux_x86_ora11g_32bit.zip;
2. 创建GoldenGate的目录/gg11,然后把tar包解到/gg11目录下:tar xvf /tools/fbo_ggs_Linux_x86_ora11g_32bit.tar -C /gg11/;
3. 为了避免权限的问题,把/gg11目录修改为oracle:oinstall用户和组,oracle用户安装oracle软件也安装GoldenGate软件:chown -R oracle:oinstall /gg11/;
3. Setting ORACLE_HOME and ORACLE_SID:安装oracle时已经设置;
4. Setting library paths for dynamic builds;
5. Installing the Oracle GoldenGate software;
1. 进入到GoldenGate软件的目录/gg11/并执行ggsci命令;
2. 执行CREATE SUBDIRS命令安装;
3. 安装完成,查看生成的目录:ll -ltr /gg11/;
6. Oracle-specific installation steps;
1. View the supplemental logging at the database level;
2. Turn on supplemental logging at the database level(把一些附加信息添加到redo log中,默认redo log只记录rowid,因为两台机器的rowid是不同的,所以要添加附加信息);
3. Switch to the next redo log file;
3. Introduce GoldenGate Directories
1. dirchk:GoldenGate checkpoint files;
2. dirdat:GoldenGate trail and extract files;
3. dirdef:Data definitions produced by DEFGEN and used to translate heterogeneous data;
4. dirpcs:Process status files;
5. dirprm:Parameter files;
6. dirrpt:Process report files;
7. dirsql:SQL scripts;
8. dirtmp:Temporary storage for transactions that exceed allocated memory;
4. Oracle GoldenGate Important Documentation;
1. Administration Guide;
2. Reference Guide;
3. Troubleshooting and Tuning Guide;
5. Command Interface-Starting and Help,命令行下如何使用帮助;
1. 进入GoldenGate目录,运行ggsci命令,此时目录下的help.txt文件才会被加载进来,使用help 或者help all命令;
2. 查看具体某条命令的帮助使用:help 命令;
3. 查看历史命令:history;
4. 执行历史命令:!n;
5. 查看进程的信息:info process;查看所有进程的信息:info all;
6. 查看gg应用日志:view ggsevt;
7. 退出:quit or exit;
6. Warnings & Errors:
1. 在安装Oracle的环境安装GoldenGate的时候,如果报找不到libnnz11.so动态链接库的话,是LD_LIBRARY_PATH环境变量没有设置正确;
2. 在安装Mysql的环境安装GoldenGate的时候,是会报找不到libnnz11.so和libclntsh.so.11.1两个动态链接库的,首先在LD_LIBRARY_PATH环境变量中添加gg的安装目录的路径,然后把Oracle环境中这两个动态链接库拷贝到gg的安装目录即可;(纠结了半天,发现是gg的版本下错了,有专门对mysql的版本,应该不会出现这样的错误,orz…..)

GoldenGate学习2–Oracle GoldenGate technical architecture

Oracle GoldenGate Technical Architecture
1. Objectives:
1. Describe Oracle GoldenGate uses;
2. Lean the components of Oracle GoldenGate;
3. Explain change capture and delivery(with and without a dump);
4. Explain inital data load;
5. Contrast batch and online operation;
6. Explain Oracle GoldenGate checkpointing;
7. Describe Oracle GoldenGate parameters, process groups and GGSCI commands;
2. Oracle GoldenGate Users:
1. Primarily userd for change data capture and delivery from database transaction logs;
2. Can optionally be used for initial load directly from database tables:
1. Especially usefull for synchronizing heterogeneous databases,对异构数据库之间同步数据特别有用;
2. Database-specific methods may be preferable for homogeneous configurations,同构数据库之间最好使用数据库本身的方法;
3. Oracle GlodenGate Components:
1. Extract:process,source;
2. Data Pump:process,source;
3. Replicat:process,target;
4. Trails or Extract files:file,source and target;
5. Checkpoints:process;
6. Manager:process,source and target;
7. Collector:process,target;
4. 使用中的各种场景:
1. Change Data Capture and Delivery;
2. Change Data Capture and Delivery using a Data Pump;
3. Bidirectional Configuration;
4. Initial Load;
5. Abount the trails:
1. To support the continuous extraction and replication of database changes, Oracle GoldenGate stores the captured changes temporarily on disk in a series of files called a trail;
2. A trail can exist on the source or target system, or an intermediary system, depending on your configuration;
3. On the local system it’s know as an extract trail(or local trail), On a remote system it’s known as a remote trail;
4. All files names in a trail begin with the same two characters which you assign when you create the trail(max 10m default). As files are created, each name is appended with a unique, six-digit serial number from 000000 through 999999, for example:/gg11/dirdat/tr000018;
6. Data Pump:In most business cases, you should use a data pump, some reasons for using a data pump include the followint;
1. Protection against network and target failures;
2. Implementing serveral phases of data filtering or transformation;
3. Consolidating data from many sources to a central target;
4. Synchronizing one source with multiple targets;
7. Procesing Methods:
1. Oracle GoldenGate can be configured for the following purposes:
1. A static extraction of selected data records from one database and loading of those records to another database;
2. Online or batch extraction and replication of selected transactional data changes and DDL changes(for supported database) to keep source and target data consistent;
3. Extraction from database and replication to a file outside the database;
2. Methods:
1. An online process runs until stopped by a user, you can use online processes to continuously extract and replicate transactional changes and DDL changes(where supported);
2. A bach run, or special run, process extracts or replicates database changes that were generated within know begin and end points;
3. A task is a special type of batch run process and is used for certain initial load methods. A task is a configuration in which Extract communicates directly with Replicat over TCP/OP. Neither a Collector process nor temporary disk storage in a trail or file is used;
8. Checkpointing:Capture, Pump, and Delivery save positions to a checkpoint file so they can recover in case of failure;
9. Parameters, Process Groups and Commands:
1. GoldenGate processes are configured by ASCII parameter files;
2. A process group consists of:
1. An Extract or Replicat process;
2. Associated parameter file;
3. Associated checkpoint file;
4. Any other files associated with that process;
5. Each process group on a system must have a unique group name;
3. Processes are added and started using the GoldenGate Software Command Interface(GGSCI) with the group name;
4. GGSCI commands also add trails, check process status,etc;

GoldenGate学习1–Oracle GoldenGate Overview

Oracle GoldenGate Overview
1. Oracle GoldenGate software enable real-time, continuous movement of transactional data across operational and analytical business systems;
2. Real-Time Acccess to Real-Time Information
1. Real-Time Access:availability,the degree to which information can be instantly accessed;
2. Real-Time Information:integration,the process of combining data from different sources to provide a unified view;
3. Transactional Data Management
1. Oracle GoldenGate provides low-impact capture, routing, transformation, and delivery of database transactions across heterogeneous environments in real time;
2. Key Capabilities:
1. Real Time:moves with sub-second latency;
2. Heterogeneous:moves changed data across different databases and platforms;
3. Transactional:maintains transaction integrity;
3. Additoinal Differentiators:
1. Performance:log-based capture moves thousands of transactions per second with low impact;
2. Extensibility and Flexibility:meets variety of customer needs and data environments with open, modular architecture;
3. Relibility:resilient against interrputions and failures;
4. Technical Architecture Overview;
5. Oracle GoldenGate Topologies;
6. Oracle GoldenGate Solutions:
1. High Availability and Disaster Torlerance:
1. Live Standby;
2. Active-Active;
3. Zero-Downtime Operations for upgrades, migrations, Maintenance;
2. Real-Time Data Integration:
1. Real-time Data warehousing;
2. Live Reporting;
3. Transactional Data Integration;
3. Oracle GoldenGate Solutions Overview;
7. Oracle GoldenGate:Databases and Platforms
1. O/S and Platforms:
1. Windows 2000, 2003, xp;
2. Linux;
3. Sun Solaris;
4. HP NonStop;
5. HP-UX;
6. HP TRU64;
7. HP OpenVMS;
8. IBM AIX;
9. IBM z/OS;
2. Databases:
1. Capture:
1. Oracle;
2. Mysql;
3. IBM DB2;
4. MSSQL;
5. Sybase ASE;
6. Ingres;
7. Teradata;
8. Enscribe;
9. SQL/MP;
10. SQL/MX;
2. Delivery:
1. all listed above;
2. HP Neoview, Netezza and any ODBC compatible databases;
3. ETL products;
4. JMS message queues or topics;
8. Oracle GoldenGate and Oracle Active Data Guard;
1. For information distribution and consolidation, application upgrades and changes:use goldengate-heterogeneous,active-active,transformations,subsetting;
2. for disaster recovery/data protection/ha:
1. simple full oracle database protection:use active data guard;
2. applicatoin desiring flexible ha,active-active,schema change,platform changes:use oracle goldengate;
3. combine the two for full database protection and information distribution;
9. Oracle GoldenGate Advantages;
10. Oracle GoldenGate Director(gg的图形化管理界面)
1. Manages,defines,configures,and reports on Oracle GoldenGate components;
2. Key features:
1. Centralized management of Oracle GoldenGate modules;
2. Rich-client and Web-based inferfaces;
3. Alert notifications and integration with 3rd-party monitoring products;
4. Real-time feedback;
5. Zero-impact implementation;
3. A graphical enterprise application that offers a visual and intuitive way to define,configure,manage,and report on all GoldenGate transactional data synchronization processes;
4. Prerequisites:
1. oracle weblogic server 11g standard,includes a JDBC driver needed for the Diector repository and appropriate version of JRE;
2. the Director Server repository requires databses:oracle or mysql 5.x;
3. Director installer requires a windows system and Unix or Linux systems;
11. Oracle GoldenGate Veridata(数据比较工具);
1. A high-speed,low impact data comparison solution:
1. identifies and reports data discrepancies between two database without interrupting those systems or the business processes they support;
2. supports Oracle, Teradata, MSSQL, NonStop, SQL/MP and Enscribe;
3. Support homogeneous and heterogeneous compares;
2. Benefits:
1. Reduce financial/legal risk exposure;
2. Speed and simplify IT work in comparing data sources;
3. No disruption to business systems;
4. Imporved failover to backup systems;
5. Confident decision-making and reporting;
12. Oracle GoldenGate products
1. Oracle GoldenGate:Includes GoldenGate Capture,Deliver and Active Data Guard and XSystem;
2. Oracle GoldenGate for Mainframe:Includes GoldenGate Capture and Deliver for HP NonStop and IMB DB2 on z/OS;
3. Oracle GoldenGate Veridata:Add-on capability to validate data in replicated systems;
4. Management Pack for GoldenGate:Add-on management pack,includes Oracle GoldenGate Director;
5. Oracle GoldenGate Adapters:Pre-packaged application content,such as for Flat File and Java adapters;
13. GodelGate and Streams
1. GoldenGate is Oracle’s strategic replicatoin solution;
2. Streams continues to be a supported Oracle Databases feature;
3. Best Stream technology will be integrated into GoldenGate;