4.高级特性(1)

1,查看extract参数文件

GGSCI (db11) 4> view param lhremd1

EXTRACT lhremd1
setenv(NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
USERID ogg, PASSWORD ogg
ReportCount Every 30 Minutes, Rate 
Report at 01:00
ReportRollover at 01:15
DiscardFile dirrpt/LHREMD1.dsc, Append
DiscardRollover at 02:00 ON SUNDAY
DBOPTIONS ALLOWNOLOGGING 
EXTTRAIL ./dirdat/l1
TABLE hr.T; 

参数说明:

ReportCount --- 从启动开始,每30分钟自动统计被抽取进程或者装载进程处理的记录数
具体用法:

说明:

Rate = # of records processed since startup / total time since startup
Delta = # of records since last report / time since last report

 
Report  --- 每天1点形成自进程启动以来所做的操作数

使用方法:

ReportRollover ---为了防止日志太大,设置切换日志的时间,例子中为每天1点05切换一次日志
使用方法:

DiscardFile:记录ogg不能处理的一些事务
用法:

DiscardRollover--防止discard文件太大,定期新建,旧的discard文件改名为:<group name><n>.<extension>

● <group name> is the name of the Extract or Replicat group
● <n> is a number that gets incremented by one each time a new file is created, for
example: myext0.dsc, myext1.dsc, myext2.dsc, and so forth.

 用法:


 
2.查看MANAGER参数文件
GGSCI (pmahdb01) 2> edit params mgr         /*在参数文件中添加如下内容   
port 7839                                       /* mgr所用端口号  
DYNAMICPORTLIST 7840-7845                       /* mgr可用的端口范围  
AUTOSTART EXTRACT *         /* 自动启动抽取进程    
AUTORESTART EXTRACT *       /* 自动重启抽取进程  
PURGEOLDEXTRACTS ./dirdat/*,usecheckpoints, minkeepdays 7            /* 队列传递结束后,依然保留本地队列7天  
LAGREPORTHOURS 1            /* 每隔1小时检查延迟报告  
LAGINFOMINUTES 30           /* 每隔30分钟检查延迟,如果超过延迟阈值,将写入错误日志  
LAGCRITICALMINUTES 45       /*延迟阈值45分钟  
GGSCI (pmahdb01) 3> start mgr    /* 启动mgr管理器  

 参数说明:

PURGEOLDEXTRACTS:删除已经处理完的trail文件,这个参数可以单独的放在extract或者replicate参数文件中,但是最好放在Manager参数文件中,可以集中的清除extracts和replicates的trail文件,其中的参数usecheckpoints告诉OGG根据checkpoints文件,仅仅删除完全处理完成的trail files,一般和purgeldextracts一起使用。minkeepdays :trail文件处理完成后保留的最少天数。

AUTOSTART :在mgr启动的时候自动启动ext和rep进程

用法:用在manager文件中

Syntax AUTOSTART <process type> <group name>


AUTORESTART:失败后重启

用法举例:

In the following example, Manager tries to start all Extract processes three times after
failure within a one hour time period, and it waits five minutes before each attempt.


AUTORESTART EXTRACT *, RETRIES 3, WAITMINUTES 5, &
RESETMINUTES 60

 


 

posted @ 2014-09-30 23:28  hao_xiaoyu  阅读(420)  评论(0编辑  收藏  举报