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

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.

猜你喜欢

转载自mikixiyou.iteye.com/blog/1491193