OGG複製程式出現 OGG-00868, 904-ORA-00904 "VISIBILITY"

snowdba發表於2015-07-13
OGG無論是源端還是目標端出現904-ORA-00904: VISIBILITY”錯誤時,常見問題之一就是OGG軟體版本和資料庫版本不匹配。 比如OGG11.2.1.0.1版本for oracle10g和for oracle11g很容易在下載介質時候搞錯。 如果資料庫是10.2.0.4版本,OGG用的是11.2.1.0.1 for 11g版本,在同步的時候就會出現下列報錯。這是個低階錯誤,也是比較容易出現的錯誤。下面來看看“事故現場”

目標端複製程式中斷,錯誤資訊如下所示:
cd $OGG_HOME
tail -100f ggserr.log 

2015-07-13 09:16:49  INFO    OGG-00996  Oracle GoldenGate Delivery for Oracle, rt1.prm:  REPLICAT RT1 started.
2015-07-13 09:16:49  ERROR   OGG-00868  Oracle GoldenGate Delivery for Oracle, rt1.prm:  OCI error (904-ORA-00904: "VISIBILITY": invalid identifier) building query to fetch unique key, SQL < SELECT key.key_name,         key.column_name,         key.descend    FROM (SELECT  c.constraint_name key_name,                 c.column_name column_name,                 c.position position,                 'ASC' descend            FROM all_cons_columns c           WHERE c.owner = :owner1             AND c.table_name = :table1             AND c.constraint_name in (                   SELECT                       FROM sys.user$ user1,                          sys.user$ user2,                          sys.cdef$ cdef,                          sys.con$ con1,                          sys.con$ con2,                          sys.obj$ obj1,                          sys.obj$ obj2                    WHERE = :owner2                      AND = :table2                      AND cdef.type# = 3                      AND bitand(cdef.defer, 36) = 4                      AND (cdef.type# = 5 OR                           cdef.enabled is not null)                      AND con2.owner# = user2.user#(+)                      AND cdef.robj# = obj2.obj#(+)                      AND cdef.rcon# = con2.con#(+)                      AND obj1.owner# = user1.user#                      AND cdef.con# = con1.con#                      AND cdef.obj# = obj1.obj#)           UNION           SELECT  i.index_name key_name,                  c.column_name column_name,                  c.column_position position,                  c.descend descend             FROM all_indexes i,                  all_ind_columns c            WHERE i.table_owner = :owner3              AND i.table_name = :table3              AND i.uniqueness = 'UNIQUE'              AND i.owner = c.index_owner              AND i.index_name = c.index_name              AND :owner7 = c.table_owner              AND :table7 = c.table_name              AND i.index_name in (                   SELECT  index_name                     FROM all_indexes                    WHERE table_.
2015-07-13 09:16:49  ERROR   OGG-00665  Oracle GoldenGate Delivery for Oracle, rt1.prm:  OCI Error describe for query (status = 904-ORA-00904: "VISIBILITY": invalid identifier), SQL< SELECT key.key_name,         key.column_name,         key.descend    FROM (SELECT  c.constraint_name key_name,                 c.column_name column_name,                 c.position position,                 'ASC' descend            FROM all_cons_columns c           WHERE c.owner = :owner1             AND c.table_name = :table1             AND c.constraint_name in (                   SELECT                       FROM sys.user$ user1,                          sys.user$ user2,                          sys.cdef$ cdef,                          sys.con$ con1,                          sys.con$ con2,                          sys.obj$ obj1,                          sys.obj$ obj2                    WHERE = :owner2                      AND = :table2                      AND cdef.type# = 3                      AND bitand(cdef.defer, 36) = 4                      AND (cdef.type# = 5 OR                           cdef.enabled is not null)                      AND con2.owner# = user2.user#(+)                      AND cdef.robj# = obj2.obj#(+)                      AND cdef.rcon# = con2.con#(+)                      AND obj1.owner# = user1.user#                      AND cdef.con# = con1.con#                      AND cdef.obj# = obj1.obj#)           UNION           SELECT  i.index_name key_name,                  c.column_name column_name,                  c.column_position position,                  c.descend descend             FROM all_indexes i,                  all_ind_columns c            WHERE i.table_owner = :owner3              AND i.table_name = :table3              AND i.uniqueness = 'UNIQUE'              AND i.owner = c.index_owner              AND i.index_name = c.index_name              AND :owner7 = c.table_owner              AND :table7 = c.table_name              AND i.index_name in (                   SELECT  index_name                     FROM all_indexes                    WHERE table_owner = .
2015-07-13 09:16:49  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, rt1.prm:  PROCESS ABENDING.
 
源端資料庫版本10.2.0.4.4
源端OGG版本如下:
cd $OGG_HOME
./ggsci
 
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 23 2012 07:27:46
 
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
 
 
 
GGSCI (bejsym02) 1> info all
 
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
 
MANAGER     RUNNING                                          
EXTRACT     RUNNING     DP1         00:00:00      00:00:01   
EXTRACT     RUNNING     EXT1        00:00:00      00:00:07
 
目標端資料庫版本10.2.0.4.8
目標端OGG版本如下:
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.6 16211226 OGGCORE_11.2.1.0.6_PLATFORMS_130418.1829
HP/UX, IA64, 64bit (optimized), Oracle 11g on Apr 18 2013 20:29:17  
version不一致不要緊,但是for oracle11g就肯定不行了!

Copyright (C) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
 
 
GGSCI (bejtdb01) 1> info all
 
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
 
MANAGER     RUNNING                                          
REPLICAT    ABENDED     RT1         00:00:22      56:35:41 

解決問題很簡單,重新下載 for 10g版本的介質。
我的環境是異構的,源端AIX,目標端HPUX。 目標端下載介質位置如下:

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29047826/viewspace-1731357/,如需轉載,請註明出處,否則將追究法律責任。

相關文章