Oracle Linux 5.7 部署ogg v11 oracle to oracle(二)

2014-11-24 18:27:57 · 作者: · 浏览: 1
7809



启动mgr:


GGSCI (ogg2) 4> start mgr


Manager started.


查看mgr信息:


GGSCI (ogg2) 7> info mgr


Manager is running (IP port ogg2.7809).


Create target Oracle tables



Shell> sqlplus ggusr/ggusr


SQL> @demo_ora_create
Verify the results:
SQL> desc tcustmer;
SQL> desc tcustord;
SQL> exit


Initial Data Load using Direct Load Method


Initial data capture


1. Add the initial load capture batch task group


Execute the following commands on the system


GGSCI (ogg1) 6> add extract einiss, sourceistable
EXTRACT added.



GGSCI (ogg1) 7> info extract *, tasks


EXTRACT EINISS Initialized 2012-09-13 14:06 Status STOPPED
Checkpoint Lag Not Available
Log Read Checkpoint Not Available
First Record Record 0
Task SOURCEISTABLE


2. Configure the initial load capture parameter file


GGSCI> EDIT PARAMS EINISS


输入如下 内容:


EXTRACT EINISS
USERID ggusr, PASSWORD "ggusr"
RMTHOST 192.168.1.87, MGRPORT 7809
RMTTASK REPLICAT, GROUP RINITT
TABLE ggtest.tcustmer;
TABLE ggtest.tcustord;


Initial data delivery


3. Add the initial load delivery batch task


Execute the following commands on the system.


GGSCI (ogg2) 9> add replicat rinitt,specialrun


4. Configure the initial load delivery parameter file


GGSCI (ogg2) 9> add replicat rinitt,specialrun


GGSCI (ogg2) 12> view params rinitt


REPLICAT RINITT
ASSUMETARGETDEFS
USERID ggusr, PASSWORD ggusr
DISCARDFILE ./dirrpt/RINITT.dsc, PURGE
MAP ggtest.*, TARGET ggtest.*;


5. Execute the initial load process


Execute the following commands on the system.
GGSCI> START EXTRACT EINISS


Verify the results on the system:
GGSCI> VIEW REPORT EINISS
Verify the results on the system:
GGSCI> VIEW REPORT RINITT


在target端查看ggtest.tcustmer和ggtest.tcustord有无数据:


SQL> conn ggtest/ggtest
Connected.
SQL> select * from tcustmer;


CUST NAME CITY ST
---- ------------------------------ -------------------- --
WILL BG SOFTWARE CO. SEATTLE WA
JANE ROCKY FLYER INC. DENVER CO


SQL> select * from tcustord;


CUST ORDER_DAT PRODUCT_ ORDER_ID PRODUCT_PRICE PRODUCT_AMOUNT TRANSACTION_ID
---- --------- -------- ---------- ------------- -------------- --------------
WILL 30-SEP-94 CAR 144 17520 3 100
JANE 11-NOV-95 PLANE 256 133300 1 100


到这里初始化已经成功了。