2 Star 0 Fork 0

mirrors_ReneNyffenegger/fatdba-Oracle-Database-Scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rat_blocking_sessions.sql 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
Prashant Dixit 提交于 2022-02-27 10:08 . Create rat_blocking_sessions.sql
--------------------------------------
-- Query 1 --
--------------------------------------
connect sys/<password> as sysdba
set linesize 500 pagesize 200
col inst_id format 99999
col sid format 99999
col spid format a6
col blocking_session_status format a6 heading 'BS'
col blocking_instance format 99 heading 'BI'
col blocking_session format 99999 heading 'BLKSID'
col session_type format a11
col event format a31
col file_name format a21
col file_id format 9999999999999999999
col call_counter format 9999999
col wait_for_scn format 99999999999999 heading 'WAITING FOR'
col wfscn format 99999999999999 heading 'WFSCN'
col commit_wait_scn format 99999999999999 heading 'CWSCN'
col post_commit_scn format 99999999999999 heading 'PCSCN'
col clock format 99999999999999999999 heading 'CLOCK'
col next_ticker format 999999999999999999999 heading 'NEXT TICKER'
select wrt.inst_id, wrt.sid, wrt.serial#, wrt.spid,
s.BLOCKING_SESSION_STATUS, s.BLOCKING_INSTANCE,
s.blocking_session,
wrt.session_type, wrt.event,
wrt.file_name, wrt.file_id, wrt.call_counter,
wrt.wait_for_scn,
greatest(wrt.dependent_scn, wrt.statement_scn) as wfscn,
wrt.commit_wait_scn, wrt.post_commit_scn,
wrt.clock, wrt.next_ticker
from gv$workload_replay_thread wrt, gv$session s
where wrt.sid = s.sid
and wrt.serial# = s.serial#
order by inst_id, sid
;
马建仓 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

搜索帮助

0d507c66 1850385 C8b1a773 1850385