ITPub博客

首页 > 数据库 > Oracle > [重庆思庄每日技术分享]-ORA-01760 当表中出现物化视图时,收集索引统计信息失败

[重庆思庄每日技术分享]-ORA-01760 当表中出现物化视图时,收集索引统计信息失败

原创 Oracle 作者:xianhua_33 时间:2022-04-13 13:31:20 0 删除 编辑

日志文件中出现ORA-01760报错(参考官方文档 ID317254.1)

现象:

Collecting

Index stats using dbms_stats.gather_index_stats might fail with

ORA-1760 when a materialized view is present on the base table.

The error can also happen when we use cascade=> TRUE option with either gather_schema_stats ot gather_table_stats.

当表中出现有物化视图时,使用dbms_stats.gather_index_stats收集索引统计信息可能会以报ORA-01760失败

当使用gather_schema_stats ot gather_table_stats,并且cascade=> TRUE选项开启时,也会发生这个错误

导致的原因是出现了查询重写,解决方法则是禁用查询重写

- alter session set query_rewrite_enabled=false;

- run your dbms_stats command


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

请登录后发表评论 登录
全部评论

注册时间:2019-10-09

  • 博文量
    95
  • 访问量
    41127