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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle GoldenGate系統之----單向同步資料表OracleGo
- Oracle GoldenGate系統之----雙向同步資料表OracleGo
- Oracle GoldenGate系統之----單向同步資料表(續)OracleGo
- Oracle goldengate初始化資料注意事項OracleGo
- oracle goldengate 初始化OracleGo
- Oracle GoldenGate系統之----安裝及使用OracleGo
- Oracle GoldenGate 資料同步初始化最佳實戰(Data Pump)OracleGo
- Oracle GoldenGate安裝應用及初始化資料示例OracleGo
- GoldenGate初始化資料載入Go
- Oracle goldengate 初始化資料的方法(轉MOS:ID 1276058.1)OracleGo
- Oracle GoldenGate系統之----相關引數說明OracleGo
- Oracle Dataguard + Goldengate資料同步OracleGo
- oracle goldengate 初始化實驗步驟OracleGo
- 系統初始化之sys init
- oracle資料庫配置goldengate同步Oracle資料庫Go
- 常見資料庫系統比較之Oracle資料庫(轉)資料庫Oracle
- Oracle Goldengate重新初始化的 3種方法OracleGo
- GoldenGate同步初始化Go
- 【GoldenGate】Oracle GoldenGate(四) 壓力測試同步百萬行資料GoOracle
- Oracle GoldenGate容災專案初始化調研模板OracleGo
- 【goldengate】官方文件筆記四 Oracle GoldenGate實時資料分佈Go筆記Oracle
- 【goldengate】官方文件筆記五 Oracle GoldenGate實時資料倉儲Go筆記Oracle
- 教育大資料之資料資產管理系統大資料
- 教育大資料之資料開發系統大資料
- 資料庫系統概述之國產資料庫資料庫
- 系統上線初始化-資料匯入工具是系統基本功能
- oracle資料庫系統管理(轉)Oracle資料庫
- PLM系統之物理資料模型模型
- 實戰goldengate:安裝配置+資料初始化+單向DML複製Go
- Oracle GoldenGate資料同步備份軟體概述OracleGo
- 利用Oracle GoldenGate記錄源系統所有表的操作OracleGo
- 獲取oracle 系統資料的sqlOracleSQL
- GoldenGate實現oracle和sqlserver雙向資料同步GoOracleSQLServer
- 資料庫系統概述之資料庫最佳化資料庫
- 大資料應用——資料探勘之推薦系統大資料
- GoldenGate異種資料庫之間的複製Go資料庫
- 【推薦系統篇】--推薦系統之測試資料
- 深入解析oracle--資料庫的初始化Oracle資料庫