第51期 OGG执行Send Extract Showtrans在数据库中不存在 XIDs

来源:这里教程网 时间:2026-03-03 22:48:41 作者:

在清理归档日志时,数据库提示 "RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process"。根据提示信息获得是“RMAN-08137:警告:存档日志未删除,备用或上游捕获过程需要”,因为恢复检查点指向旧日期的归档日志,所以日志不能删除。因为我们使用了ogg downstream模式,所以有可能是ogg在使用日志。 使用试图。

V$ARCHIVED_LOG.NEXT_CHANGE# is GREATER THAN the required SCN V$ARCHIVED_LOG.APPLIED column is NO

     1.使用info EXT1 showch命令

GGSCI (ogg-downstream) 2> info EXT1 showch
EXTRACT    EXT1      Last Started 2025-09-23 10:30   Status RUNNING
Checkpoint Lag       00:00:04 (updated 00:00:01 ago)
Process ID           2150120
Log Read Checkpoint  Oracle Integrated Redo Logs
                     2025-11-06 09:59:32
                     SCN 1427.3281286590 (6132199617982)
Current Checkpoint Detail:
Read Checkpoint #1
  Oracle Integrated Redo Log
  Startup Checkpoint (starting position in the data source):
    Timestamp: 2025-09-12 22:51:18.000000
    SCN: 0.0 (0)
  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Timestamp: 2025-11-06 09:58:57.000000
    SCN: 1427.3281206865 (6132199538257)
  Current Checkpoint (position of last record read in the data source):
    Timestamp: 2025-11-06 09:59:32.000000
    SCN: 1427.3281286590 (6132199617982)
  BR Previous Recovery Checkpoint:
    Timestamp: 2025-09-23 10:30:29.122782
    SCN: 0.0 (0)
  BR Begin Recovery Checkpoint:
    Timestamp: 2025-11-06 08:21:37.000000
    SCN: 1427.3272636247 (6132190967639)
  BR End Recovery Checkpoint:
    Timestamp: 2025-11-06 08:22:06.000000
    SCN: 1427.3272639007 (6132190970399)
Write Checkpoint #1
  GGS Log Trail
  Current Checkpoint (current write position):
    Sequence #: 1239
    RBA: 462743191
    Timestamp: 2025-11-06 09:59:36.987094
    Extract Trail: ./dirdat/lt
    Seqno Length: 9
    Flip Seqno Length: No
    Trail Type: EXTTRAIL
Header:
  Version = 2
  Record Source = A
  Type = 18
  # Input Checkpoints = 1
  # Output Checkpoints = 1
Configuration:
  Data Source = 3
  Transaction Integrity = 1
  Task Type = 0
Status:
  Start Time = 2025-09-23 10:30:34
  Last Update Time = 2025-11-06 09:59:36
  Stop Status = A
  Last Result = 520

  2.使用send xxx showtrans 命令列出的交易未在数据库中运行。

GGSCI (ogg-downstream) 2> send EXT1,showtrans tabular
Sending SHOWTRANS request to EXTRACT EXT1 ...
XID                     Items    Extract   Redo Thread  Start Time           SCN                               Redo Seq  Redo RBA            Status              
------------------------------------------------------------------------------------------------------------------------------------------------------
0.20.24.431297          0        EXT1      1            2025-11-06:10:01:00  1427.3281400602 (6132199731994)   5929      16135316            Running             
0.54.32.1331045         1        EXT1      2            2025-11-06:10:01:25  1427.3281412575 (6132199743967)   4327      379084416           Running             
0.35.3.463223           0        EXT1      1            2025-11-06:10:01:40  1427.3281415855 (6132199747247)   5929      26984976            Running

 2. showtrans命令中列出的事务ID未在数据库中运行。

SQL>  select b.inst_id,
         b.sid,
         b.serial#,
         b.username,
         wait_class,
         state,
         SECONDS_IN_WAIT,
         XIDUSN || '.' || XIDSLOT || '.' || XIDSQN "XID",
         (START_SCNW * 4294967296) + START_SCNB "Start SCN",
         SES_ADDR
    from gv$transaction a, gv$session b
   where a.SES_ADDR = b.saddr;

原因: 经过排查,查询mos文档,发现是由于数据库bug造成的Database Bug 29485877解决方法:1)  设置 _lcrpingfrequency to 10  in Extract process :tranlogoptions _lcrpingfrequency 102) 修复数据库bug:打数据库database patch of bug 29485877

相关推荐