Golden Gate 資料產生實體方法之一

本文介绍使用 Oracle GoldenGate 在导入资料过程中确保一致性的方法,包括通过 Flashback SCN 参数实现资料的一致性导出和导入步骤。

Oracle Golden Gate 在導入資料時,保證導入資料過程中一致性的方法。

1. 查看當前 oracle SCN
select to_char(dbms_flashback.get_system_change_number) from dual;
1159722

2. 匯出需要同步的表或者整個用戶下的表
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
exp xxx/xxx file=xxxtable.dmp flashback_scn=1159722

3. 導入
imp yyy/yyy fromuser=xxx touser=yyy file=xxxtable.dmp  ignore=y

4. 啟動 replicat
start rep1 aftercsn 1159722

需要注意的一點是:在匯出資料的時候開啟 extract 進程和關閉 replicat 進程

 

FLASHBACK_SCN

Default: There is no default

Purpose

Specifies  the system change number (SCN) that Export will use to enable the Flashback Query utility.

Syntax and Description

FLASHBACK_SCN=scn_value





The export operation is performed with data that is consistent as of the specified SCN. If the  NETWORK_LINK  parameter is specified, the SCN refers to the SCN of the source database.

Restrictions

·          FLASHBACK_SCN  and  FLASHBACK_TIME  are mutually exclusive.

·          The  FLASHBACK_SCN  parameter pertains only to the Flashback Query capability of Oracle Database. It is not applicable to Flashback Database, Flashback Drop, or Flashback Data Archive.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值