Oracle GoldenGate系統之----資料初始化
對於OGG資料初始化載入,有幾種方法,如RMAN,邏輯備份(EXP/EXPDP)等,這裡只介紹使用OGG的初始化,其實這個方法現實中使用的最少。
[oracle@dg ogg]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
-- 使用SOURCEISTABLE定義
GGSCI (dg) 1> add extract extb,sourceistable
EXTRACT added.
-- 直接將資料投遞到目標端
GGSCI (dg) 2> edit param extb
extract extb
setenv(NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
userid scott@wailon, password tiger
rmthost 192.168.56.131, mgrport 7801
rmttask replicat, group repb
table scott.b;
"dirprm/extb.prm" [New] 6L, 172C written
-- info all看不到初始化程式
GGSCI (dg) 3> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING DGRAC 00:00:00 00:00:03
EXTRACT RUNNING EXTDG 00:00:00 00:00:01
REPLICAT RUNNING REP1 00:00:00 00:00:08
GGSCI (dg) 4> start extb
Sending START request to MANAGER ...
EXTRACT EXTB starting
GGSCI (dg) 5> info extb
EXTRACT EXTB Initialized 2013-09-25 16:46 Status RUNNING
Checkpoint Lag Not Available
Log Read Checkpoint Not Available
First Record Record 0
Task SOURCEISTABLE
GGSCI (dg) 6> info extb
EXTRACT EXTB Initialized 2013-09-25 16:46 Status STOPPED
Checkpoint Lag Not Available
Log Read Checkpoint Not Available
First Record Record 0
Task SOURCEISTABLE
GGSCI (dg) 11> view report extb
2013-09-25 17:07:45 INFO OGG-01017 Wildcard resolution set to IMMEDIATE because SOURCEISTABLE is used.
***********************************************************************
** Running with the following parameters **
***********************************************************************
2013-09-25 17:07:45 INFO OGG-03035 Operating system character set identified as US-ASCII. Locale: en_US, LC_ALL: en_
US.
extract extb
setenv(NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
Set environment variable (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
userid scott@wailon, password *****
rmthost 192.168.56.131, mgrport 7801
rmttask replicat, group repb
table scott.b;
2013-09-25 17:07:45 WARNING OGG-00869 No unique key is defined for table 'B'. All viable columns will be used to repres
ent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
Using the following key columns for source table SCOTT.B: OWNER, OBJECT_NAME, SUBOBJECT_NAME, OBJECT_ID, DATA_OBJECT_ID,
OBJECT_TYPE, CREATED, LAST_DDL_TIME, TIMESTAMP, STATUS, TEMPORARY, GENERATED, SECONDARY, NAMESPACE, EDITION_NAME.
2013-09-25 17:07:51 WARNING OGG-01194 EXTRACT task REPB abended : INSERTAPPEND must be used with the BATCHSQL parameter
in order to function correctly.
2013-09-25 17:07:51 ERROR OGG-01203 EXTRACT abending.
2013-09-25 17:07:51 ERROR OGG-01668 PROCESS ABENDING.
-- 對初始化的表增加主鍵,使用OGG同步的物件最好都有primary key或unique key約束
[oracle@dg ogg]$ sqlplus scott/tiger
SQL> alter table b add constraint pk_object_id primary key (object_id);
Table altered.
-- 再次啟動資料初始化程式extb
GGSCI (dg) 1> start extb
Sending START request to MANAGER ...
EXTRACT EXTB starting
GGSCI (dg) 2> info extb
EXTRACT EXTB Last Started 2013-09-25 17:13 Status RUNNING
Checkpoint Lag Not Available
Log Read Checkpoint Table SCOTT.B
2013-09-25 17:13:42 Record 1
Task SOURCEISTABLE
GGSCI (dg) 3> view report extb
2013-09-25 17:17:13 INFO OGG-01017 Wildcard resolution set to IMMEDIATE because SOURCEISTABLE is used.
***********************************************************************
** Running with the following parameters **
***********************************************************************
2013-09-25 17:17:13 INFO OGG-03035 Operating system character set identified as US-ASCII. Locale: en_US, LC_ALL: en_
US.
extract extb
setenv(NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
Set environment variable (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
userid scott@wailon, password *****
rmthost 192.168.56.131, mgrport 7801
rmttask replicat, group repb
table scott.b;
Using the following key columns for source table SCOTT.B: OBJECT_ID.
2013-09-25 17:17:13 INFO OGG-01815 Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/u01/app/ogg/dirtmp.
CACHEMGR virtual memory values (may have been adjusted)
CACHESIZE: 64G
CACHEPAGEOUTSIZE (normal): 8M
PROCESS VM AVAIL FROM OS (min): 128G
CACHESIZEMAX (strict force to disk): 96G
Database Version:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
Database Language and Character Set:
NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK"
NLS_LANGUAGE = "AMERICAN"
NLS_TERRITORY = "AMERICA"
NLS_CHARACTERSET = "ZHS16GBK"
Processing table SCOTT.B
***********************************************************************
* ** Run Time Statistics ** *
***********************************************************************
Report at 2013-09-25 17:17:20 (activity since 2013-09-25 17:17:13)
Output to repb:
From Table SCOTT.B:
# inserts: 201
# updates: 0
# deletes: 0
# discards: 0
REDO Log Statistics
Bytes parsed 0
Bytes output 54389
-- 已成功初始化201條記錄
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/429786/viewspace-1062223/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- About the Oracle GoldenGate TrailOracleGoAI
- ORACLE GoldenGate Initial LoadOracleGo
- GoldenGate異種資料庫之間的複製Go資料庫
- Oracle GoldenGate安裝(一)OracleGo
- Oracle GoldenGate安裝(二)OracleGo
- Oracle GoldenGate安裝(三)OracleGo
- Oracle GoldenGate 18.1釋出OracleGo
- Oracle Goldengate是如何保證資料有序和確保資料不丟失的?OracleGo
- oracle 資料透過goldengate 實時同步到kafka訊息佇列中OracleGoKafka佇列
- GoldenGate 自動化初始資料Go
- 教育大資料之資料開發系統大資料
- 教育大資料之資料資產管理系統大資料
- Step by Step Data Replication Using Oracle GoldenGateOracleGo
- Oracle GoldenGate常用引數詳解OracleGo
- [資料整合/資料同步] 基於資料庫增量日誌的資料同步方案 : Flink CDC/Debezium/DataX/Canal/Oracle Goldengate/Kettle/Sqoop資料庫OracleGoOOP
- 資料庫系統概述之國產資料庫資料庫
- 系統初始化
- 使用GoldenGate 遷移Oracle到PostgreSQL/LightDBGoOracleSQL
- 資料庫系統概述之資料庫最佳化資料庫
- 大資料應用——資料探勘之推薦系統大資料
- Oracle案例13—— OGG-01163 Oracle GoldenGate Delivery for Oracle, reprpt01.prmOracleGo
- 【推薦系統篇】--推薦系統之測試資料
- Vue原始碼學習之資料初始化Vue原始碼
- Ubuntu系統初始化Ubuntu
- Oracle Goldengate 12c打pus補丁OracleGo
- Oracle GoldenGate 18.1 支援的DB和OS列表OracleGo
- ORACLE GoldenGate 使用技巧-容錯處理等OracleGo
- Oracle資料庫適配哪些國產作業系統?Oracle資料庫作業系統
- Linux掛載資料盤教程,Linux初始化系統盤後重新掛載資料盤方法Linux
- Oracle資料庫恢復之resetlogsOracle資料庫
- GoldenGate抽取Informix資料庫安裝及配置GoORM資料庫
- Oracle 19C OGG基礎運維-02資料初始化Oracle運維
- SpringBoot系列之資料庫初始化-datasource配置方式Spring Boot資料庫
- springboot系列文章之啟動時初始化資料Spring Boot
- OGG之 各種資料泵初始化指令碼指令碼
- 用python生成oracle goldengate複製配置檔案PythonOracleGo
- Oracle GoldenGate 11g官方文件Administrator’s GuideOracleGoGUIIDE
- 【資料庫資料恢復】HP-UX系統ORACLE資料庫被誤刪除的資料恢復資料庫資料恢復UXOracle
- 異構資料庫資料遷移 oracle to mysql之oracle sqlloader和mysql load data資料庫OracleMySql