【MW】Drop Materialized View Hangs with 'Enq: JI - Contention'
事件:当运行DROP MATERIALIZED VIEW 时 会话hang住。
用下面命令生成跟踪文件(通过任意会话):
点击(此处)折叠或打开
- sqlplus /nolog
- connect / as sysdba
- REM The select below is to avoid problems on some releases
- select * from dual;
- oradebug setmypid
- oradebug unlimit
- oradebug dump systemstate 266
我们可以在系统文件中看到下面的等待事件:
点击(此处)折叠或打开
- WAIT #4: nam='enq: JI - contention' ela= 4961081 name|mode=1246298118 view object #=3893654 0=0 obj#=3012275 tim=30332617495564
- WAIT #4: nam='enq: JI - contention' ela= 2929739 name|mode=1246298118 view object #=3893654 0=0 obj#=3012275 tim=30332620425505
当我们试图删除这个物化视图时由于DBMS_JOB引起了这个等待事件,所以在删除这个JOB后我们就可以删除该物化视图
原因:Due to the JI contention
解决办法:
1. killled正在运行的job,检查Check DBMS_JOBS_RUNNING 视图.
2. 刷新job并离线,移除job
3. 完成删除,看不到相关job和物化视图。
附等待事件介绍:出处:http://www.askmaclean.com/archives/enq-ji-contention.html
Sessions waiting on this event are waiting on locks held during materialized view operations (such as refresh, alter) to prevent concurrent operations on the same materialized view.
Solutions
A materialized view cannot be fast refreshed more than once in a given period because it is serialized during the commit phase. Ensure that only one session at a time is performing the refreshes. If there is more than one session, the first session will work normally but the subsequent sessions will wait on “enq: JI – contention”.
Waits on this event can also be caused by on-commit time logic within the materialized view. Normally when a session updates record 1 and commits and then another session updates record 2 and commits, they do not have to wait for each other. However, when using an on commit-time fast refreshable materialized view on top of the table, we do have to wait when two sessions do totally unrelated transactions concurrently against the same table. This is not a problem when the table is modified infrequently or only by a single session, but it can be a big problem when applied to a table that performs a lot of modifications concurrently. Be sure to use on commit-time fast refreshable materialized views for implementing business rules only on tables that are not concurrently accessed or infrequently changed
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29487349/viewspace-1789477/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29487349/viewspace-1789477/
【MW】Drop Materialized View Hangs with 'Enq: JI - Contention'相关推荐
- 【朝花夕拾】Android自定义View篇之(六)Android事件分发机制(中)从源码分析事件分发机制...
前言 转载请注明,转自[https://www.cnblogs.com/andy-songwei/p/11039252.html]谢谢! 在上一篇文章[[朝花夕拾]Android自定义View篇之(五 ...
- 【朝花夕拾】Android自定义View篇之(六)Android事件分发机制(中)从源码分析事件分发逻辑及经常遇到的一些“诡异”现象
前言 转载请注明,转自[https://www.cnblogs.com/andy-songwei/p/11039252.html]谢谢! 在上一篇文章[[朝花夕拾]Android自定义View篇之(五 ...
- 【等待事件】序列等待事件总结(enq: SQ - contention、row cache lock、DFS lock handle和enq: SV - contention)...
[等待事件]序列等待事件总结(enq: SQ - contention.row cache lock.DFS lock handle和enq: SV - contention) [等待事件]序列等待事 ...
- 【朝花夕拾】Android自定义View篇之(一)View绘制流程
前言 转载请申明转自[https://www.cnblogs.com/andy-songwei/p/10955062.html]谢谢! 自定义View.多线程.网络,被认为是Android开发者必须牢 ...
- 【朝花夕拾】Android自定义View篇之(十一)View的滑动,弹性滑动与自定义PagerView...
前言 转载请声明,转载自[https://www.cnblogs.com/andy-songwei/p/11213718.html],谢谢! 由于手机屏幕尺寸有限,但是又经常需要在屏幕中显示大量的内容 ...
- 【朝花夕拾】Android自定义View之(一)手把手教你看懂View绘制流程——向源码要答案
前言 原文:Android自定义View之(一)手把手教你看懂View绘制流程--向源码要答案 View作为整个app的颜值担当,在Android体系中占有重要的地位.深入理解Android View ...
- 【android-tips】如何在view中取得activity对象
(转载请注明出处:http://blog.csdn.net/buptgshengod) 今天想实现在view中返回上一个activity的功能,想了半天.因为在虽然view是包含于一个activity ...
- 【整理】视图簇View cluster的创建
视图簇View cluster的创建 一.视图簇简介 在ERP系统中我们经常会看到带层次结构的维护视图,尤其是在后台IMG配置中,如事务代码OKKP.其实它就是一个视图簇(View cluster), ...
- 【Clickhouse】Clickhouse Live View
文章目录 1.概述 1.概述 转载:Clickhouse Live View Live view 是一种特殊的视图,不属于表引擎,作用类似于事件监听器,能够将一条SQL查询结果作为监控目标,当目标增加 ...
最新文章
- 如何只使用预训练模型的卷积层
- 嘻哈说:开放封闭原则
- awk 分隔符_awk命令使用实例
- ”语义分割”中的“语义”
- django drf Filter
- pack_padded_sequence 和 pad_packed_sequence
- Zygote工作流程分析
- ubuntu安装portainer_Docker【二】:Docker管理工具Portainer
- Eclipse 答疑:Eclipse 如何更换夜间及外部主题?如何修改代码样式、背景颜色、字体大小?为何注释文字大小不一?
- 《Objective-C入门经典》——2.1节Objective-C世界中的面向对象程序设计
- 另一个串口verilog 代码
- CSS知识点补充收集
- python编写代码运用递归画图形_python数据结构与算法 22 递归图形
- 盘点那些年我们一起玩过的网络安全工具
- 如何使用Transformers和Tokenizers从头开始训练新的语言模型
- 第一章 行列式(知识点部分)
- mysql根据姓分组_mysql 分组查询 group by
- 全球暗网监控工具 TOP 10
- 怎么对接个人收款支付接口(扫码支付)
- 故障:Office 重复提示激活
热门文章
- 商业落地的 DeFi 热潮中,公链们或殊途而同归
- 最近很火的微信炸屎功能该怎么用?
- 标识符的命名和使用 规则
- 万字长文,图文并茂的给你讲清SpringBoot注解,自动装配原理!
- RabbitMQ:使用Docker构建RabbitMQ高可用负载均衡集群
- cron每半个小时执行一次_Linux中Cron任务间隔执行:每隔几分钟/几小时/几天
- 引入mybatis-plus报 Invalid bound statement错误怎么办,动动手指改一个地方就行
- 苏宁易购开放平台_发力内循环,苏宁易购开放平台商品交易规模大增56.83%
- 一种锂电池充放电及外部供电自动切换的电路
- iis 网站添加 身份验证_在10分钟内将身份验证添加到任何网页