1. configure the initial load extract parameter file (source)
     GGSCI> edit param eload01

      sourceistable
      userid oggmgr, password oracle
      rmthost oggtest.localdomain, mgrport 5009
      rmtfile ./dirdat/TCUSTMER.dat, purge
      table scott.tcustmer;
      rmtfile ./dirdat/TCUSTORD.dat, purge
      table scott.tcustord;


2. Execute the initial load capture process (source)
     # extract paramfile dirprm/eload01.prm reportfile dirrpt/ELOD01.rpt
     # ggsci
     GGSCI> view report ELOD01

3. configure the initial load delivery parameter file (target)
     # ls -al ./dirdat/TCUST*.dat
     # ggsci
     GGSCI> edit param loadtcustmer

      specialrun
      end runtime
      userid oggmgr, password oracle
      assumetargetdefs
      extfile ./dirdat/TCUSTMER.dat
      map scott.tcustmer, target scott.tcustmer;


      GGSCI> edit param loadtcustord

      specialrun
      end runtime
      userid oggmgr, password oracle
      assumetargetdefs
      extfile ./dirdat/TCUSTORD.dat
      map scott.tcustord, target scott.tcustord;


4. execute the initial load delivery process
     # replicat paramfile dirprm/loadtcustmer.prm reportfile dirrpt/LOADTCUSTMER.rpt
     # replicat paramfile dirprm/loadtcustord.prm reportfile dirrpt/LOADTCUSTORD.rpt

     # ggsci
     GGSCI> view report LOADTCUSTMER
     GGSCI> view report LOADTCUSTORD


'Oracle Middleware' 카테고리의 다른 글

Oracle Goldengate의 기본적인 단방향 복제  (0) 2013.12.10


1. oracle database 기본 goldengate db user 생성 (source, target)

     SQL> create user oggmgr identified by oracle default tablespace users;
     SQL> grant dba to oggmgr;  -- role_setup script 는 ? 
     
2. oracle database supplemental log & archive log 설정 (source)
     SQL> alter database add supplemental log data; 
     SQL> select supplemental_log_data_min from v$database;
     SQL> shutdown immediate;
     SQL> startup mount
     SQL> alter database archivelog;
     SQL> alter database open;
     SQL> alter system switch logfile;
     SQL> archive log list;
     SQL> show parameter log_archive_dest_1

3. database test user 생성 (source, target)
     SQL> create user app identified by app default tablespace users;
     SQL> grant connect, resource to app;

4. goldengate 설치 (source, target)
     # ggsci
     GGSCI> create subdirs
     GGSCI> edit params ./GLOBALS

     GGSCHEMA OGGMGR
     CHECKPOINTTABLE OGGMGR.GGSCHKPT
     SYSLOG NONE

     GGSCI> edit param mgr

     port 9010 -- target은 9020

     GGSCI> start mgr
     GGSCI> info mgr
     GGSCI> info all

5. 테스트 테이블 생성 (source, target)
     # sqlplus app/app @demo_ora_create

6. 테스트 테이블에 대한 suplemental logging 설정 (source)
     # ggsci
     GGSCI> dblogin userid oggmgr, password oracle
     GGSCI> info trandata app.*
     GGSCI> add trandata app.tcustmer
     GGSCI> add trandata app.tcustord
     GGSCI> info trandata app.*

7. checkpoint table 생성 (target)
     #ggsci
     GGSCI> dblogin userid oggmgr, password oracle
     GGSCI> add checkpointtable

8. extract configuration & start (source)
     GGSCI> edit param ext01
     
     extract ext01
     userid oggmgr, password oracle
     discardfile ./dirout/ext01.dec, append, megabytes 50
     discardrollover at 00:01
     reportcount every 1 records
     reportrollover at 00:01

     exttrail ./dirdat/ex
     table app.*;

     GGSCI> dblogin userid oggmgr, password oracle
     GGSCI> add extract ext01, tranlog, begin now
     GGSCI> add exttrail ./dirdat/ext, extract ext01, megabytes 50
     GGSCI> info ext01
     GGSCI> start ext01

9. pump configuration & start (source)
     # ggsci
     GGSCI> edit param pmp01

     extract pmp01
     passthru
     rmthost oggtest.localdomain, mgrport 9020
     rmttrail ./dirdat/ex
     reportcount every 1 records
     reportrollover at 00:01
     table app.*;

     GGSCI> add extract pmp01, exttrailsource ./dirdat/ex
     GGSCI> add exttrail ./dirdat/ex, extract pmp01, megabytes 50
     GGSCI> start pmp01
     GGSCI> info pmp01

10. replicat configuration & start (target)
     #ggsci
     GGSCI> edit param rep01

     replicat rep01
     userid oggmgr, password oracle
     discardfile ./dirout/rep01.dec, append, megabytes 50
     discardrollover at 00:01
     reportcount every 1 records
     reportrollover at 00:01
     assumetargetdefs
     map app.tcustmer, target app.tcustmer;
     map app.tcustord, target app.tcustord;

     GGSCI> add replicat rep01, exttrail ./dirdat/ex
     GGSCI> start rep01
     GGSCI> info rep01

11. 테스트 (source)
     # sqlplus app/app @demo_ora_insert

12. goldengate stop (source, target)
     #ggsci
     GGSCI> stop *
     GGSCI> stop mgr


'Oracle Middleware' 카테고리의 다른 글

Oracle Goldengate의 initial data load  (0) 2013.12.10

+ Recent posts