2 Star 0 Fork 0

mirrors_ReneNyffenegger/fatdba-Oracle-Database-Scripts

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
ash_object_enq_contention.sql 658 Bytes
Copy Edit Raw Blame History
--
-- Author: Prashant 'The FatDBA' Dixit
--
col objid format 99999999 head 'Object Id'
col obj format a70 head 'Owner.Object : SubObject'
col objid format 9999999
col cnt format 9,999,999
col event format a32
break on event skip 1
select event event
,count(*) cnt
,current_obj# objid
,o.owner||'.'||object_name||decode(subobject_name,null,' ',' : ')||subobject_name obj
from v$active_session_history h
,dba_objects o
where event like 'enq:%'
and current_obj# = o.object_id
group by current_obj#
,o.owner||'.'||object_name||decode(subobject_name,null,' ',' : ')||subobject_name
,event
having count(*) >20
order by event
,cnt
;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_ReneNyffenegger/fatdba-Oracle-Database-Scripts.git
git@gitee.com:mirrors_ReneNyffenegger/fatdba-Oracle-Database-Scripts.git
mirrors_ReneNyffenegger
fatdba-Oracle-Database-Scripts
fatdba-Oracle-Database-Scripts
main

Search