滴落后重新创建甲骨文物质的视图失败
我有一个实现的视图,该视图是通过每天连接外部方加载的表格,具有不同的结构(例如新列)。为了调整表结构的更改,我建立了每日批次,该批量根据最新表格掉落并重新创建了实现的视图,然后进行完整的刷新。
批处理失败有时带有错误ora-00001:唯一约束(sys.i_obj1)被称为
drop drop a droped View的视图
,然后尝试尝试,然后尝试尝试重新创建它。但是,如果失败后一秒钟左右,重新创造将成功。
sys.i_obj1
是sys.obj $(obj#,所有者#,类型#)
的唯一索引
是sql批次运行以分别掉落并重新创建mview :
掉落材料的视图T_MV
create materialized view t_mv
build deferred
using no index
enable query rewrite
as
select /*+ full(a) full(b) parallel(a, 8) parallel(b, 8) */
a.*
b.col1,
b.col2
from tbl_a a, tbl_b b
where a.id_col = b.id_col
我怀疑当Oracle仍在完成现有MView的删除时发生错误,而娱乐启动。但是我找不到证明这一点的方法。我在Oracle 19C数据库中。
有人可以在这里放一些灯吗?
I have a Materialized View that is built by joining tables loaded by external party every day, with potential different structure (such as new columns). To adapt table structure changes, I built a daily batch that drops and recreates the Materialized View based on latest tables, followed by Complete Refresh.
The batch failed sometimes with error ORA-00001: unique constraint (SYS.I_OBJ1) violated
after it called drop materialized view
, and then attempted to recreate it. However, the re-creation will succeed if it is retried one second or so after the failure.
The SYS.I_OBJ1
is an unique index on SYS.OBJ$(OBJ#, OWNER#, TYPE#)
Below are SQL the batch runs to drop and recreate the Mview respectively:
drop materialized view t_mv
create materialized view t_mv
build deferred
using no index
enable query rewrite
as
select /*+ full(a) full(b) parallel(a, 8) parallel(b, 8) */
a.*
b.col1,
b.col2
from tbl_a a, tbl_b b
where a.id_col = b.id_col
I suspect the error occurred when Oracle is still finishing the removal of the existing MView, while the recreation is kicked off. But I can't find a way to prove it. I am with Oracle 19c database.
Can anyone please shed some lights here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论