暂无图片
刷新物化视图报错
我来答
分享
Dream
2020-09-24
刷新物化视图报错
暂无图片 5M

Oracle 11GR2生产系统报错Oracle.png,重新创建物化视图也报错

我来答
添加附件
收藏
分享
问题补充
5条回答
默认
最新
章芋文

看下这个SQL

SELECT DBLINK, NVL(DISABLED, 'F'), FLAG FROM SYSTEM.DEF$_DESTINATION;

有可能是bug:Materialized View Refresh Fails with ORA-1422 When Duplicate Entry in SYSTEM.DEF$_DESTINATION Table (Doc ID 2172529.1)

或者是你用10046跟踪下,看是那句SQL报错了。

暂无图片 评论
暂无图片 有用 0
Dream

大佬 这个是有输出的SQL image.png

暂无图片 评论
暂无图片 有用 0
章芋文

(1) MView refresh will fail with the error ORA-1422.

exec dbms_mview.refresh(‘TEST_MV’, ‘C’)
Error report -
ORA-01422: exact fetch returns more than requested number of rows

The duplicate entry in this table “SYSTEM.DEF$_DESTINATION” is causing the problem.

按照这个来做吧,需要删其中一条数据

1. Create a backup copy of the table "SYSTEM.DEF$_DESTINATION" (just to be on safer side).
2. Delete one of the duplicate rows from the table "SYSTEM.DEF$_DESTINATION".
3. Commit the change.

4. Again re-run the below query and you should get the output as given below and make sure there are no duplicate rows.
SQL> column dblink format a30;
SQL> SELECT DBLINK, NVL(DISABLED, 'F'), FLAG FROM SYSTEM.DEF$_DESTINATION;

5. Re-run the MV refresh and check if it throws ORA-1422 error.
暂无图片 评论
暂无图片 有用 0
Dream

感谢大佬 可以了

暂无图片 评论
暂无图片 有用 0
王摩卡

管用,谢谢大佬!

暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏