|
板凳
楼主 |
发表于 2019-3-15 17:08:28
|
只看该作者
四、ogg源端配置(dg端)
1)配置安全认证
备库的oggadmin管理用户和管理表空间从主库同步而来。
GGSCI (datahub) 1> add credentialstore
Credential store created.
GGSCI (datahub) 2> alter credentialstore add user oggadmin,password oggadmin
Credential store altered.
GGSCI (datahub) 3> dblogin useridalias oggadmin
Successfully logged into database.
GGSCI (datahub as oggadmin@orcl) 4>
(2)查看trandata
GGSCI (datahub as oggadmin@orcl) 17> info trandata sztech.*
Logging of supplemental redo log data is enabled for table SZTECH.TEST.
Columns supplementally logged for table SZTECH.TEST: "ID", "NAME".
Prepared CSN for table SZTECH.TEST: 1006556
dg备库只需要查看下就行,add trandata只能在主库操作。备库操作则会报错,提示数据库处于只读模式
(3)配置管理进程
GGSCI (datahub as oggadmin@orcl) 17> view params mgr
PORT 7809
DYNAMICPORTLIST 7801-7809
AUTORESTART ER *,RETRIES 5,WAITMINUTES 7
PURGEOLDEXTRACTS ./dirdat/*,usecheckpoints, minkeepdays 7
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45
(4)配置抽取进程
GGSCI (datahub as oggadmin@orcl) 18> view params extorcl
add extract extorcl,tranlog,begin now,threads 2
add exttrail ./dirdat/eb,extract extorcl,megabytes 100
extract extorcl
setenv(NLS_LANG="AMERICAN_AMERICA.ZHS16GBK")
setenv(ORACLE_SID=orcl)
useridalias oggadmin
discardfile ./dirrpt/extorcl.dsc,purge,megabytes 200
exttrail ./dirdat/eb
tranlogoptions minefromactivedg
tranlogoptions altarchivedlogformat %t_%s_%r.dbf
tranlogoptions altarchivelogdest /u01/app/oracle/archivelog
statoptions reportfetch
table sztech.test;
(5)配置传输进程
GGSCI (datahub as oggadmin@orcl) 48> view params p_orcl
add extract p_orcl,exttrailsource ./dirdat/eb,begin now
add rmttrail /home/oracle/ogg/dirdat/pb,extract p_orcl,megabytes 100
extract p_orcl
USERIDALIAS oggadmin
rmthost 192.168.133.120,mgrport 7809,compress
rmttrail /home/oracle/ogg/dirdat/pb
passthru
table sztech.test;
(6)查看进程状态
GGSCI (datahub) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXTORCL 00:00:00 00:00:08
EXTRACT RUNNING P_ORCL 00:00:00 00:00:04
|
|