合 OGG-01082 The call to the DBOCI_check_for_virtual_column: OCI error (1031-ORA-01031: insufficient privileges) determining if column is virtual
OGG-01082 The call to the DBOCI_check_for_virtual_column: OCI error (1031-ORA-01031: insufficient privileges) determining if column is virtual. Table: ODS.POS_INFO_F, Column ITEM_NO function from get_odbc_table_def failed with return code 0.
解决:
1 | grant all on sys.user$ to oggo; |
1.生产中升级了11.2.0.3到12.2.0.1数据库之后,启动ogg目标端复制进程,发现报错。
++++++++++++++++++++++++++++++++++++++++++++++++++++
2018-03-21 15:41:39 INFO OGG-00996 Oracle GoldenGate Delivery for Oracle, reputest.prm: REPLICAT REPUTEST started.
2018-03-21 15:41:40 ERROR OGG-01082 Oracle GoldenGate Delivery for Oracle, reputest.prm: The call to the DBOCI_check_for_virtual_column: OCI error (1031-ORA-01031: insufficient privileges) determining if column is virtual. Table: SCOTT.EMP1, Column EMPNO function from get_odbc_table_def failed with return code 0.
2018-03-21 15:41:40 ERROR OGG-01668 Oracle GoldenGate Delivery for Oracle, reputest.prm: PROCESS ABENDING.
2018-03-21 15:47:55 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): info all.
++++++++++++++++++++++++++++++++++++++++++++++++++++
2.这个错误从表面上看,就是权限不足(1031-ORA-01031: insufficient privileges)。怎样定位问题。
在复制进程中加入如下参数。对执行的语句做10046的trace跟踪。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | GGSCI 1> view params reputest REPLICAT REPUTEST setenv (NLS_LANG="AMERICAN_AMERICA.UTF8") USERID goldengate@clone, PASSWORD goldengate ASSUMETARGETDEFS DISCARDFILE /u01/goldengate/dirrpt/reputest.dsc,PURGE --NODYNSQL --NOBINARYCHARS --SHOWSYNTAX --GROUPTRANSOPS 1 --MAXTRANSOPS 1 --HANDLECOLLISIONS MAP SCOTT.EMP, TARGET SCOTT.EMP; MAP SCOTT.DEPT, TARGET SCOTT.DEPT; MAP SCOTT.BONUS, TARGET SCOTT.BONUS; MAP SCOTT.EMP1, TARGET SCOTT.EMP1; SQLEXEC "ALTER SESSION SET TRACEFILE_IDENTIFIER='OGG_DEBUG'" SQLEXEC "ALTER SESSION SET EVENTS '10046 trace name context forever, level 12'" |