ORA-23345: table “string”.”string” not registered to collect statistics

文档解释

ORA-23345: table “string”.”string” not registered to collect statistics

Cause: A procedure that deals with conflict resolution statistics-gathering was called for a table that was not registered to collect statistics.

Action: Call dbms_repcat.register_statistics to register the table.

ORA-23345: table “string”.”string” not registered to collect statistics是指指定表未注册统计收集,它是一种由Oracle数据库表期权的错误,它允许Oracle 操作器提供和记录有关用户数据的统计信息。

Oracle官方说明:

这是由ORA-23345表示的表不在统计收集注册表中注册。 您必须更改表选项以在统计收集中注册此表并确保它收集统计信息。

常见案例

当用户未正确设置统计收集时,就可能出现此错误。

一般处理方法及步骤

1)检查统计收集状态:

SELECT owner, table_name, tbl_stats_opt_curs FROM dba_tables WHERE tbl_stats_opt_curs IS NULL;

2)如果出现ORA-23345的错误,则更改表的选项以注册该表,如下所示:

ALTER TABLE

ESTIMATE STATISTICS;

3)在更改表选项后,检查表是否已注册收集统计:

SELECT owner, table_name, tbl_stats_opt_curs FROM dba_tables WHERE tbl_stats_opt_curs IS NOT NULL;

4)如果表注册收集统计,则查看表是否有活动统计:

SELECT owner, table_name, stats,stime FROM dba_tab_statistics

WHERE table_name = ‘

‘;

你可能感兴趣的