oracle linux ogg,oracle linux 5.7 布署ogg v11 oracle to oracle之环境配置及数据初始化

Create the source tables and load the initial data.

Shell> cd

Shell> sqlplus ggtest/ggtest

SQL> @demo_ora_create

SQL> @demo_ora_insert

Verify the results:

SQL> select * from tcustmer;

SQL> select * from tcustord;

SQL> exit

Add supplemental logging

GGSCI> DBLOGIN USERID ggusr, PASSWORD ggusr

GGSCI> ADD TRANDATA ggtest.TCUSTMER

GGSCI> ADD TRANDATA ggtest.TCUSTORD

Verify that supplemental logging has been turned on for these tables.

GGSCI> INFO TRANDATA ggtest.TCUST*

Logging of supplemental redo log data is enabled for table GGTEST.TCUSTMER.

Columns supplementally logged for table GGTEST.TCUSTMER: CUST_CODE.

Logging of supplemental redo log data is enabled for table GGTEST.TCUSTORD.

Columns supplementally logged for table GGTEST.TCUSTORD: CUST_CODE, ORDER_DATE, PRODUCT_CODE, ORDER_ID.

Configure the Manager

Configure the Manager process on the target system

[oracle@ogg2 ogg]$ ggsci

GGSCI> EDIT PARAMS MGR

在文件中输入下面内容并保存:

port 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

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值