Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

0

积分

1

好友

3

主题
1#
发表于 2013-9-13 09:42:35 | 查看: 4037| 回复: 3
如果想将A数据库中TAB1表中的列(C1,C2)的新增或者变更数据实时的同步到B数据库中的TAB2表中的列(C3,C4)上,用OGG可以实现吗,不行用ETL工具可以实现嘛!

关键是实时,或者写触发器?


求助各位!
2#
发表于 2013-9-13 09:59:40
表的map  for example:MAP US03.T52 TARGET US01.T53;

col 的map for example:COLMAP (usedefaults,
salary = sal)

回复 只看该作者 道具 举报

3#
发表于 2013-9-13 23:45:34
FOR EXAMPLE:

GGSCI (targetserver) > edit params RHREMD1
Replicat RHREMD1
-------------------------------------------------------------------
-- Replicat for HR Schema
-------------------------------------------------------------------
USERID 'GGER', PASSWORD "AACAAAAAAAAAAADAVHTDKHHCSCPIKAFB", ENCRYPTKEY default
AssumeTargetDefs
ReportCount Every 30 Minutes, Rate
Report at 01:00
ReportRollover at 01:15
DiscardFile dirrpt/RHREMD1.dsc, Append
DiscardRollover at 02:00 ON SUNDAY
Map HR.EMPLOYEES, Target HR.EMPLOYEES,COLMAP (USEDEFAULTS), FILTER (@RANGE (1,3));
Map HR.JOBS, Target HR.JOBS,COLMAP (USEDEFAULTS), FILTER (@RANGE (1,3));
Map HR.JOB_HISTORY, Target HR.JOB_HISTORY,COLMAP (USEDEFAULTS),
FILTER (@RANGE (1,3));
Map HR.LOCATIONS, Target HR.LOCATIONS,COLMAP (USEDEFAULTS), FILTER (@RANGE (1,3));
Map HR.DEPARTMENTS, Target HR.DEPARTMENTS,COLMAP (USEDEFAULTS),
FILTER (@RANGE (1,3));
Map HR.COUNTRIES, Target HR.COUNTRIES,COLMAP (USEDEFAULTS), FILTER (@RANGE (1,3));
Map HR.REGIONS, Target HR.REGIONS,COLMAP (USEDEFAULTS), FILTER (@RANGE (1,3));

回复 只看该作者 道具 举报

4#
发表于 2013-9-13 23:47:14
Column Mapping: Overview

Oracle GoldenGate provides the capability to map columns from one table to another.

Data can be transformed between dissimilar database tables.

Use COLMAP to map target columns from your source columns.

Oracle GoldenGate automatically matches source to target column names with USEDEFAULTS.

Mapping can be applied when either extracting or replicating data.


MAP HR.CONTACT, TARGET HR.PHONE,
COLMAP (USEDEFAULTS,
NAME = CUST_NAME,
PHONE_NUMBER = @STRCAT( "(", AREA_CODE, ")",
PH_PREFIX, "-", PH_NUMBER ) );

Column Mapping: Building History
This example uses special values to build a history of operations data:
INSERTALLRECORDS
MAP SALES.ACCOUNT, TARGET REPORT.ACCTHISTORY,
COLMAP (USEDEFAULTS,
TRAN_TIME = @GETENV("GGHEADER","COMMITTIMESTAMP"),
OP_TYPE = @GETENV("GGHEADER", "OPTYPE"),
BEFORE_AFTER_IND =
@GETENV("GGHEADER", "BEFOREAFTERINDICATOR"),
);

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-20 09:16 , Processed in 0.049371 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569