• 【翻译自mos文章】在Oracle GoldenGate中循环使用ggserr.log的方法


    在OGG中循环使用ggserr.log的方法:

    參考原文:
    OGG How Do I Recycle The "ggserr.log" File? (Doc ID 967932.1)

    适用于:
    Oracle GoldenGate - Version 4.0.0 and later
    Generic Linux

    问题
    GoldenGate的 ggserr.log 日志文件包含有关 GoldenGate 事件的信息。比方:进程启动。关闭,error 。warning。该文件可能会变的非常大。为了循环使用该文件,你不得不停止全部的GoldenGate进程。

    解决方式:
    1.有一个需求是:在GoldenGate进程执行时。循环使用ggserr.log,在此种情况下。你能够用例如以下的方法:

              1).  Back up the "ggserr.log" file using the following command:
                       cp -p ggserr.log ggserr.log.bkup
    
              2).  Truncate the file using the following command:
                       cat /dev/null > ggserr.log
    


     

    注意:
    在windows环境中, 须要使用unix 模拟器(比方cygwin)来完毕上述操作。


    假设ggserr.log非常大。上一步可能须要非常长时间,在此时间之内。注意,这个时间是指在1)和2)之间存在时间差,在step1 和step2之间插入的条目会丢失。
    假设要求不能丢失不论什么条目。那么在ggserr.log最末尾的行(指在step1和step2之间新插入的行)能够被再次备份。

    样例:

    tail -500 > ggserr.log.bkup_2


     

    对于veridata:
    Similar functionality is available for the Veridata veridata.log.
    See note 1385983.1 for details.

    2. 另外的一个解决方式是 use logrotate (note 1466849.1)

    --->注意:note 1466849.1  是指:How to Rotate GoldenGate ggserr.log using logrotate utility for Unix/Linux?

    (Doc ID 1466849.1)


     

  • 相关阅读:
    Java框架之Mybatis(一)
    Java框架之Hibernate(四)
    Java框架之Hibernate(三)
    递归与分治
    散列
    绪论
    系统的分类(二)
    系统的定义与分类(一)
    Guess My Number 游戏
    2.5 随机数的生成
  • 原文地址:https://www.cnblogs.com/liguangsunls/p/6761428.html
Copyright © 2020-2023  润新知