我们的 Oracle 11.2.0.3 数据库中有几个 CTXCAT 类型的 Oracle Text 索引。Oracle 企业管理器中的一个进程每 8 分钟运行一次,并转储有关多年不存在的索引的错误,例如跟踪文件 $ORACLE_HOME/node_SID/sysman/log/emagent.trc 中的一个:
==================================================================
2013-08-13 05:51:09,882 Thread-1079278176 WARN vpxoci: OCI Error -- ErrorCode(20000): ORA-20000: Oracle Text error:
DRG-10502: index PRODUCTION.IX2_WEB_SESSION_DETAIL does not exist
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_REPORT", line 534
ORA-06512: at line 48
SQL = "/* OracleOEM */
DECLARE
TYPE data_cursor_type IS REF CURSOR;
data_c"...
LOGIN = dbsnmp/<PW>@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node-vip)(PORT=1521))(CONNECT_DATA=(SID=ORCL1)))
2013-08-13 05:51:09,882 Thread-1079278176 ERROR fetchlets.sql: ORA-20000: Oracle Text error:
DRG-10502: index PRODUCTION.IX2_WEB_SESSION_DETAIL does not exist
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_REPORT", line 534
ORA-06512: at line 48
2013-08-13 05:51:09,882 Thread-1079278176 ERROR engine: [rac_database,ORCL,textIndexStats] : nmeegd_GetMetricData failed : ORA-20000: Oracle Text error:
DRG-10502: index PRODUCTION.IX2_WEB_SESSION_DETAIL does not exist
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_REPORT", line 534
ORA-06512: at line 48
2013-08-13 05:51:09,882 Thread-1079278176 WARN collector: <nmecmc.c> Error exit. Error message: ORA-20000: Oracle Text error:
DRG-10502: index PRODUCTION.IX2_WEB_SESSION_DETAIL does not exist
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_REPORT", line 534
ORA-06512: at line 48
==================================================================
我进行了一次疯狂的尝试,并以 CONTEXT 类型的名称创建了一个新索引(CTXCAT 不起作用),错误停止了一段时间。我删除了该索引,然后开始得到以下内容,这与我在尝试创建 CTXCAT 类型的索引时看到的错误相同:
==================================================================
2013-08-30 02:13:07,129 Thread-1075751520 WARN vpxoci: OCI Error -- ErrorCode(20000): ORA-20000: Oracle Text error:
DRG-11119: operation is not supported by this index type
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_REPORT", line 534
ORA-06512: at line 48
SQL = "/* OracleOEM */
DECLARE
TYPE data_cursor_type IS REF CURSOR;
data_c"...
LOGIN = dbsnmp/<PW>@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node-vip)(PORT=1521))(CONNECT_DATA=(SID=ORCL1)))
2013-08-30 02:13:07,129 Thread-1075751520 ERROR fetchlets.sql: ORA-20000: Oracle Text error:
DRG-11119: operation is not supported by this index type
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_REPORT", line 534
ORA-06512: at line 48
2013-08-30 02:13:07,130 Thread-1075751520 ERROR engine: [rac_database,ORCL,textIndexStats] : nmeegd_GetMetricData failed : ORA-20000: Oracle Text error:
DRG-11119: operation is not supported by this index type
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_REPORT", line 534
ORA-06512: at line 48
2013-08-30 02:13:07,130 Thread-1075751520 WARN collector: <nmecmc.c> Error exit. Error message: ORA-20000: Oracle Text error:
DRG-11119: operation is not supported by this index type
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_REPORT", line 534
ORA-06512: at line 48
==================================================================
我做了一些调查,发现在任何 CTXCAT 类型索引上调用 ctx_report.index_stats( ctxcat_indexname ) 都会给我完全相同的错误,直到行号。
更多的调查随之而来,因为在谷歌上寻找 textIndexStats 并没有出现太多。我终于在输出列表中找到了它:
emctl status agent scheduler | grep textIndexStats
但是里面什么都没有select * from dba_scheduler_jobs matched textIndexStats
,所以我不清楚下一步该往哪里看,想知道如何防止再次发生。