ITPub博客

首页 > 数据库 > Oracle > 第61期 ogg数据同步进程OCI Error ORA-30036错误处理方案

第61期 ogg数据同步进程OCI Error ORA-30036错误处理方案

原创 Oracle 作者:pxbibm 时间:2026-04-08 14:17:28 0 删除 编辑

开发同事要求执行数据变更,由于本数据库数据量非常大,数据库中有很多大表。数据量大约有9.1T。

开发同事执行的sql,大部分是ddl的变更。

并且数据库中配置有ogg数据同步。执行ddl变更后,ogg数据同步进程变的异常了。

说明一下:执行ddl的是在A用户下执行的,ogg数据同步的表是B用户的。因此应该初步判断和执行DDl没有关系。

并不是数据变更造成的数据同步异常。

查看ogg异常信息。异常信息中主要包含了如下错误。

2026-04-08 12:40:10  WARNING OGG-01004  Aborted grouped transaction on TEST.WWXMLCOLL, Database error 30036 (OCI Error ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS1' (sta

tus = 30036), SQL <INSERT INTO "TEST"."WWXMLCOLL" ("COMCODEISC","ITEMCODE","REPTYPE","STATYEAR","STATMON","UPITEMCODE","PARENTCOMCODEISC","LAYER","STATVALUE","REMARK","OUTITEMCODE","READDATE") V

ALUES (:a0,:a1,:a2,:a3,:a4,:a5,:a6,:a7,:a8,:a9,:a10,:a11)>).

从上面的错误信息中我们发现是 undo tablespace 'UNDOTBS1' 表空间满了。


GGSCI (test) 2> view report rtest
***********************************************************************
                 Oracle GoldenGate Delivery for Oracle
                 Version 19.22.0.0.240124 34973701_FBO
  Linux, x64, 64bit (optimized), Oracle 19c  on Mar 19 2024 13:03:21
 
Copyright (C) 1995, 2024, Oracle and/or its affiliates. All rights reserved.
                    Starting at 2026-04-08 12:38:49
***********************************************************************
Operating System Version:
Linux
Version #1 SMP PREEMPT_DYNAMIC Tue Oct 3 11:12:36 EDT 2023, Release 5.14.0-362.8.1.el9_3.x86_64
Node: 
Machine: x86_64
                         soft limit   hard limit
Address Space Size   :    unlimited    unlimited
Heap Size            :    unlimited    unlimited
File Size            :    unlimited    unlimited
CPU Time             :    unlimited    unlimited
Process id: 387271
Description: 
***********************************************************************
**            Running with the following parameters                  **
***********************************************************************
2026-04-08 12:38:49  INFO    OGG-03059  Operating system character set identified as UTF-8.
2026-04-08 12:38:49  INFO    OGG-02695  ANSI SQL parameter syntax is used for parameter parsing.
2026-04-08 12:38:49  INFO    OGG-01360  REPLICAT is running in Classic mode.
REPLICAT test
DISCARDFILE ./dirrpt/test.dsc, APPEND, MEGABYTES 500
ASSUMETARGETDEFS
USERID ogg, PASSWORD ***
DDL INCLUDE ALL ,EXCLUDE OPTYPE GRANT
DDLOPTIONS REPORT
MAPEXCLUDE test.TABLE1
MAP test.*,TARGET test.*;
2026-04-08 12:38:50  INFO    OGG-06451  Triggers will be suppressed by default.
2026-04-08 12:38:50  INFO    OGG-02734  Using heartbeat table from schema ggadmin.
2026-04-08 12:38:50  INFO    OGG-01815  Virtual Memory Facilities for: COM
    anon alloc: mmap(MAP_ANON)  anon free: munmap
    file alloc: mmap(MAP_SHARED)  file free: munmap
    target directories:
    /oradata/ggs19c/dirtmp.
2026-04-08 12:38:50  INFO    OGG-25340  
Database Version:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.25.0.0.0.
2026-04-08 12:38:50  INFO    OGG-25341  
Database Language and Character Set:
NLS_LANGUAGE     = "AMERICAN" 
NLS_TERRITORY    = "AMERICA" 
NLS_CHARACTERSET = "ZHS16GBK".
2026-04-08 12:38:50  INFO    OGG-06604  Database TEST CPU info: CPU Count 32, CPU Core Count 16, CPU Socket Count 1.
***********************************************************************
**                     Run Time Messages                             **
***********************************************************************
2026-04-08 12:38:50  INFO    OGG-02243  Opened trail file /oradata/ggs19c/dirdat/cs000002964 at 2026-04-08 12:38:50.004548.
2026-04-08 12:38:50  WARNING OGG-02760  ASSUMETARGETDEFS is ignored because trail file /oradata/ggs19c/dirdat/cs000002964 contains table definitions.
2026-04-08 12:38:50  INFO    OGG-03506  The source database character set, as determined from the trail file, is zhs16gbk.
2026-04-08 12:38:50  INFO    OGG-06506  Wildcard MAP resolved (entry TEST.*): MAP "TEST"."WWXMLCOLL",TARGET TEST."WWXMLCOLL".
2026-04-08 12:38:50  INFO    OGG-02756  The definition for table TEST.WWXMLCOLL is obtained from the trail file.
2026-04-08 12:38:50  INFO    OGG-06511  Using following columns in default map by name: COMCODEISC, ITEMCODE, REPTYPE, STATYEAR, STATMON, UPITEMCODE, PARENTCOMCODEISC, LAYER, STATVALUE, REMARK, OU
TITEMCODE, READDATE.
2026-04-08 12:38:50  INFO    OGG-06510  Using the following key columns for target table TEST.WWXMLCOLL: COMCODEISC, ITEMCODE, STATYEAR, REPTYPE, STATMON.
2026-04-08 12:40:10  WARNING OGG-01004  Aborted grouped transaction on TEST.WWXMLCOLL, Database error 30036 (OCI Error ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS1' (sta
tus = 30036), SQL <INSERT INTO "TEST"."WWXMLCOLL" ("COMCODEISC","ITEMCODE","REPTYPE","STATYEAR","STATMON","UPITEMCODE","PARENTCOMCODEISC","LAYER","STATVALUE","REMARK","OUTITEMCODE","READDATE") V
ALUES (:a0,:a1,:a2,:a3,:a4,:a5,:a6,:a7,:a8,:a9,:a10,:a11)>).
2026-04-08 12:40:10  WARNING OGG-01003  Repositioning to rba 248909967 in seqno 2964.
2026-04-08 12:41:14  WARNING OGG-01154  SQL error 30036 mapping TEST.WWXMLCOLL to TEST.WWXMLCOLL OCI Error ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS1' (status = 3003
6), SQL <INSERT INTO "TEST"."WWXMLCOLL" ("COMCODEISC","ITEMCODE","REPTYPE","STATYEAR","STATMON","UPITEMCODE","PARENTCOMCODEISC","LAYER","STATVALUE","REMARK","OUTITEMCODE","READDATE") VALUES (:a0
,:a1,:a2,:a3,:a4,:a5,:a6,:a7,:a8,:a9,:a10,:a11)>.
Source Context :
  SourceModule            : [er.replicat.errors]
  SourceID                : [er/replicat/reperrors.cpp]
  SourceMethod            : [repError]
  SourceLine              : [1819]
  ThreadBacktrace         : [16] elements
                          : [/oradata/ggs19c/libgglog.so(CMessageContext::AddThreadContext())]
                          : [/oradata/ggs19c/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...))]
                          : [/oradata/ggs19c/libgglog.so(_MSG_QualTableName_QualTableName(CSourceContext*, int, ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1> const&, ggs::gglib::ggapp::CQualDBOb
jName<(DBObjType)1> const&, CMessageFactory::MessageDisposition))]
                          : [/oradata/ggs19c/replicat(ggs::er::ReplicatContext::repError(short, int, char const*, extr_ptr_def*, ggs::gglib::gglcr::CommonLCR const*, std_rec_hdr_def*, char*, Objec
tMetadata*, bool))]
                          : [/oradata/ggs19c/replicat()]
                          : [/oradata/ggs19c/replicat(ggs::er::ReplicatContext::processRecord(ggs::gglib::gglcr::CommonLCR const*, ggs::gglib::gglcr::CommonLCR*, extr_ptr_def*&, extr_ptr_def*&, bo
ol&, int&, bool, RepCsn&))]
                          : [/oradata/ggs19c/replicat(ggs::er::ReplicatContext::processReplicatLoop())]
                          : [/oradata/ggs19c/replicat(ggs::er::ReplicatContext::run())]
                          : [/oradata/ggs19c/replicat()]
                          : [/oradata/ggs19c/replicat(ggs::gglib::MultiThreading::MainThread::ExecMain())]
                          : [/oradata/ggs19c/replicat(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*))]
                          : [/oradata/ggs19c/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
                          : [/oradata/ggs19c/replicat(main)]
                          : [/lib64/libc.so.6()]
                          : [/lib64/libc.so.6(__libc_start_main)]
                          : [/oradata/ggs19c/replicat()]
2026-04-08 12:41:14  ERROR   OGG-01296  Error mapping from TEST.WWXMLCOLL to TEST.WWXMLCOLL.
***********************************************************************
*                   ** Run Time Statistics **                         *
***********************************************************************
2026-04-08 12:41:14  INFO    OGG-02932  Reading /oradata/ggs19c/dirdat/cs000002964, current SEQNO 2,964, RBA 455,670,832, 920,590 records, m_file_seqno = 2,964, m_file_rba = 455,671,054.
Report at 2026-04-08 12:41:14 (activity since 2026-04-08 12:38:50)
From Table LISMAN.LFXMLCOLL to LISMAN.LFXMLCOLL:
       #                   inserts:    920590
       #                   updates:         0
       #                   deletes:         0
       #                   upserts:         0
       #                  discards:         1
DDL replication statistics:
                    Operations:         0
             Mapped operations:         0
           Unmapped operations:         0
              Other operations:         0
           Excluded operations:         0
                        Errors:         0
                Retried errors:         0
              Discarded errors:         0
                Ignored errors:         0
Last log location read:
     FILE:      /oradata/ggs19c/dirdat/cs000002964
     SEQNO:     2964
     RBA:       455670832
     TIMESTAMP: 2026-04-08 11:46:30.000394
     EOF:       NO
     READERR:   0
2026-04-08 12:41:14  ERROR   OGG-01668  PROCESS ABENDING.
CACHE OBJECT MANAGER statistics
CACHE MANAGER VM USAGE
vm current     =      0    vm anon queues =      0 
vm anon in use =      0    vm file        =      0 
vm used max    =      0    cachesize      =     16G
CACHE CONFIGURATION
cache size            =  16G   cache force paging   =  24G
pageout eligible size =   8M   cache vm pageout max =  64M
================================================================================
RUNTIME STATS FOR SUPERPOOL
Note: CACHE objects are often but not always proxies for transactions
CACHE Object Stats
objects active  =      0    max concurrent =      0 
non-zero total  =      0    objects total  =      0 
CACHE File Caching
filecache rqsts        =      0    bytes to disk      =      0 
file retrieves         =      0    objs filecached    =      0 
queue entries          =      0    queue processed    =      0 
queue entry not needed =      0    queue not signaled =      0 
fc requesting obj      =      0 
CACHE MANAGEMENT
buffer links   =      0   anon gets   =      0 
forced unmaps  =      0   cnnbl try   =      0 
cached out     =      0 
Note: For statistics tables below each specification represents a power of
two bucket.
For example: '|4K: 1234 |8K:' represents 1234 items between 4K and 8K-1
Allocation Request Distribution
< 128B:       0 
 128B:        0     | 256B:        0     | 512B:        0     |   1K:        0 
   2K:        0     |   4K:        0     |   8K:        0     |  16K:        0 
  32K:        0     |  64K:        0     | 128K:        0     | 256K:        0 
 512K:        0     |   1M:        0     |   2M:        0     |   4M:        0 
   8M:        0     |  16M:        0     |  32M:        0     |  64M:        0 
 128M:        0     | 256M:        0     | 512M:        0     |   1G:        0 
   2G:        0 
Cached Object Size Distribution
    0:        0 
 < 4K:        0 
   4K:        0     |   8K:        0     |  16K:        0     |  32K:        0 
  64K:        0     | 128K:        0     | 256K:        0     | 512K:        0 
   1M:        0     |   2M:        0     |   4M:        0     |   8M:        0 
  16M:        0     |  32M:        0     |  64M:        0     | 128M:        0 
 256M:        0     | 512M:        0     |   1G:        0     |   2G:        0 
   4G:        0     |   8G:        0     |  16G:        0     |  32G:        0 
  64G:        0     | 128G:        0     | 256G:        0     | 512G:        0 
   1T:        0     |   2T:        0     |   4T:        0     |   8T:        0 
  16T:        0     |  32T:        0     |  64T:        0     | 128T:        0 
 256T:        0     | 512T:        0     |   1P:        0     |   2P:        0 
================================================================================
CUMULATIVE STATS FOR SUPERPOOL (PREVIOUS RUNS ONLY)
Note: CACHE objects are often but not always proxies for transactions
CACHE Object Stats
objects active  =      0    max concurrent =      0 
non-zero total  =      0    objects total  =      0 
CACHE File Caching
filecache rqsts        =      0    bytes to disk      =      0 
file retrieves         =      0    objs filecached    =      0 
queue entries          =      0    queue processed    =      0 
queue entry not needed =      0    queue not signaled =      0 
fc requesting obj      =      0 
CACHE MANAGEMENT
buffer links   =      0   anon gets   =      0 
forced unmaps  =      0   cnnbl try   =      0 
cached out     =      0 
Allocation Request Distribution
< 128B:       0 
 128B:        0     | 256B:        0     | 512B:        0     |   1K:        0 
   2K:        0     |   4K:        0     |   8K:        0     |  16K:        0 
  32K:        0     |  64K:        0     | 128K:        0     | 256K:        0 
 512K:        0     |   1M:        0     |   2M:        0     |   4M:        0 
   8M:        0     |  16M:        0     |  32M:        0     |  64M:        0 
 128M:        0     | 256M:        0     | 512M:        0     |   1G:        0 
   2G:        0 
Cached Object Size Distribution
    0:        0 
 < 4K:        0 
   4K:        0     |   8K:        0     |  16K:        0     |  32K:        0 
  64K:        0     | 128K:        0     | 256K:        0     | 512K:        0 
   1M:        0     |   2M:        0     |   4M:        0     |   8M:        0 
  16M:        0     |  32M:        0     |  64M:        0     | 128M:        0 
 256M:        0     | 512M:        0     |   1G:        0     |   2G:        0 
   4G:        0     |   8G:        0     |  16G:        0     |  32G:        0 
  64G:        0     | 128G:        0     | 256G:        0     | 512G:        0 
   1T:        0     |   2T:        0     |   4T:        0     |   8T:        0 
  16T:        0     |  32T:        0     |  64T:        0     | 128T:        0 
 256T:        0     | 512T:        0     |   1P:        0     |   2P:        0 
QUEUE Statistics
num queues =     13     q hits =      0      q misses =      0 
queue size  q hits  curlen  maxlen     cannibalized
  0   64K      0       0       0       0 
  1  128K      0       0       0       0 
  2  256K      0       0       0       0 
  3  512K      0       0       0       0 
  4    1M      0       0       0       0 
  5    2M      0       0       0       0 
  6    4M      0       0       0       0 
  7    8M      0       0       0       0 
  8   16M      0       0       0       0 
  9   32M      0       0       0       0 
 10   64M      0       0       0       0 
 11  128M      0       0       0       0 
 12  256M      0       0       0       0 
================================================================================
RUNTIME STATS FOR CACHE POOL #0
POOL INFO   group: rlis  id: p387271_BLOB  instance: 0  tid: (nil)
objects active =        0   objects concurrent (max) =     0 
objects total  =        0   (0 )
flag           = 0x000000030
last error     = (0=<none>)
Allocation Request Distribution
< 128B:       0 
 128B:        0     | 256B:        0     | 512B:        0     |   1K:        0 
   2K:        0     |   4K:        0     |   8K:        0     |  16K:        0 
  32K:        0     |  64K:        0     | 128K:        0     | 256K:        0 
 512K:        0     |   1M:        0     |   2M:        0     |   4M:        0 
   8M:        0     |  16M:        0     |  32M:        0     |  64M:        0 
 128M:        0     | 256M:        0     | 512M:        0     |   1G:        0 
   2G:        0 
================================================================================
CUMULATIVE STATS FOR CACHE POOL #0 (PREVIOUS RUNS ONLY)
POOL INFO   group: rlis  id: p387271_BLOB  instance: 0  tid: (nil)
objects active =        0   objects concurrent (max) =     0 
objects total  =        0   (0 )
flag           = 0x000000030
last error     = (0=<none>)
Allocation Request Distribution
< 128B:       0 
 128B:        0     | 256B:        0     | 512B:        0     |   1K:        0 
   2K:        0     |   4K:        0     |   8K:        0     |  16K:        0 
  32K:        0     |  64K:        0     | 128K:        0     | 256K:        0 
 512K:        0     |   1M:        0     |   2M:        0     |   4M:        0 
   8M:        0     |  16M:        0     |  32M:        0     |  64M:        0 
 128M:        0     | 256M:        0     | 512M:        0     |   1G:        0 
   2G:        0

解决方案:

为undo表空间添加数据文件。

alter tablespace UNDOTBS1 add datafile '/oradata/test/undotbs02.dbf' size 100m autoextend on,'/oradata/test/undotbs02.dbf' size 100m autoextend on;

再次启动ogg进程,数据同步恢复正常。

[oracle@test ggs19c]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 19.22.0.0.240124 34973701_FBO
Linux, x64, 64bit (optimized), Oracle 19c  on Mar 19 2024 13:02:34
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2024, Oracle and/or its affiliates. All rights reserved.
GGSCI (TEST) 1> info *
REPLICAT   RTEST      Last Started 2026-04-08 13:49   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:01 ago)
Process ID           468342
Log Read Checkpoint  File ./dirdat/cs000002966
                     2026-04-08 14:14:48.000146  RBA 75793851
GGSCI (TEST) 2> info all
Program     Status      Group       Lag at dpt  Time Since dpt
MANAGER     RUNNING                                           
REPLICAT    RUNNING     RTEST        00:00:00      00:00:07    
GGSCI (TEST) 3>











来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12798004/viewspace-3115536/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
【DBAplus社群】联合发起人。ACOUG核心成员,Oracle用户组年轻专家。熟悉Oracle的体系结构,擅长Oracle数据库架构规划、SQL优化、OWI方面性能的优化。曾服务于航天、航空、机车、大型制造行业数据库的维护以及系统开发工作,开发过基于Oracle数据库的大型ERP系统。
  • 博文量
    341
  • 访问量
    2469669