0 Replies Latest reply on Jul 10, 2019 6:22 AM by 4040471

    怎么在alert目录下的log.xml中关闭logminer的相关操作日志?

    4040471

      Oracle版本10g-19c中,使用了logminer,但是在$ORACLE_SID/alert的目录下产生了大量的log_x.xml

       

      oracle@open5 alert]$ cd /opt/oracle/diag/rdbms/orclcdb/ORCLCDB/alert
      [oracle@open5 alert]$ ls
      log_100.xml  log_109.xml  log_117.xml  log_12.xml  log_20.xml  log_29.xml  log_37.xml  log_45.xml  log_53.xml  log_61.xml  log_6.xml   log_78.xml  log_86.xml  log_94.xml
      log_101.xml  log_10.xml   log_118.xml  log_13.xml  log_21.xml  log_2.xml   log_38.xml  log_46.xml  log_54.xml  log_62.xml  log_70.xml  log_79.xml  log_87.xml  log_95.xml
      log_102.xml  log_110.xml  log_119.xml  log_14.xml  log_22.xml  log_30.xml  log_39.xml  log_47.xml  log_55.xml  log_63.xml  log_71.xml  log_7.xml   log_88.xml  log_96.xml
      log_103.xml  log_111.xml  log_11.xml   log_15.xml  log_23.xml  log_31.xml  log_3.xml   log_48.xml  log_56.xml  log_64.xml  log_72.xml  log_80.xml  log_89.xml  log_97.xml
      log_104.xml  log_112.xml  log_120.xml  log_16.xml  log_24.xml  log_32.xml  log_40.xml  log_49.xml  log_57.xml  log_65.xml  log_73.xml  log_81.xml  log_8.xml   log_98.xml
      log_105.xml  log_113.xml  log_121.xml  log_17.xml  log_25.xml  log_33.xml  log_41.xml  log_4.xml   log_58.xml  log_66.xml  log_74.xml  log_82.xml  log_90.xml  log_99.xml
      log_106.xml  log_114.xml  log_122.xml  log_18.xml  log_26.xml  log_34.xml  log_42.xml  log_50.xml  log_59.xml  log_67.xml  log_75.xml  log_83.xml  log_91.xml  log_9.xml
      log_107.xml  log_115.xml  log_123.xml  log_19.xml  log_27.xml  log_35.xml  log_43.xml  log_51.xml  log_5.xml   log_68.xml  log_76.xml  log_84.xml  log_92.xml  log.xml
      log_108.xml  log_116.xml  log_124.xml  log_1.xml   log_28.xml  log_36.xml  log_44.xml  log_52.xml  log_60.xml  log_69.xml  log_77.xml  log_85.xml  log_93.xml
      

       

       

      记录的都是logminer的相关操作,因为会频繁执行logminer,所以这里面的日志增长非常快,非常占用磁盘空间

       

      使用到的一些logminer方法:dbms_logmnr_d.build、dbms_logmnr.add_logfile、dbms_logmnr.start_logmnr、select *  FROM v$logmnr_contents;

       

      log.xml日志内容:

      <msg time='2019-07-10T12:26:05.981+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>星期三 7月  10 12:26:05 2019
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:05.981+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>Logminer Bld: Lockdown for CDB$ROOT complete. UnwindToSCN is 6641935
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:10.645+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>LOGMINER: summary for session# = 2147495937
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:10.645+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>LOGMINER: StartScn: 6641880 (0x00000000006558d8)
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:10.645+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>LOGMINER: EndScn: 0 (0x0000000000000000)
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:10.645+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>LOGMINER: HighConsumedScn: 0
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:10.645+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>LOGMINER: PSR flags: 0x0
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:10.645+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>LOGMINER: Session Flags: 0x4000441
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:10.645+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>LOGMINER: Session Flags2: 0x0
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:10.645+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>LOGMINER: Read buffers: 4
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:10.645+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>LOGMINER: Region Queue size: 256
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:10.645+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>LOGMINER: Redo Queue size: 4096
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:10.645+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>LOGMINER: Memory LWM: limit 10M, LWM 12M, 80%
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:10.646+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>LOGMINER: Memory Release Limit: 0M
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:10.646+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>LOGMINER: Max Decomp Region Memory: 1M
       </txt>
      </msg>
      <msg time='2019-07-10T12:26:10.646+08:00' org_id='oracle' comp_id='rdbms'
       type='UNKNOWN' level='16' host_id='open5'
       host_addr='10.20.38.128' module='JDBC Thin Client' pid='5428'
       con_uid='1' con_id='1' con_name='CDB$ROOT'>
       <txt>LOGMINER: Transaction Queue Size: 1024
       </txt>
      </msg>
      

       

       

      目的是在执行logminer的的包时,不产生日志,该怎么去关闭呢?