jinquan26 发表于 2018-9-25 06:22:28

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
  $ 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 thesystem
  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 thesystem.
  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 thesystem.
  GGSCI> START EXTRACT EINISS
  Verify the results on thesystem:
  GGSCI> VIEW REPORT EINISS
  Verify the results on thesystem:
  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
  到这里初始化已经成功了。

页: [1]
查看完整版本: oracle linux 5.7 布署ogg v11 oracle to oracle之环境配置及数据初始化