Created
September 26, 2017 15:40
-
-
Save teopost/f6518b5e8444e027e039a02407fc8e62 to your computer and use it in GitHub Desktop.
oracle - Sessioni che bloccano altre sessioni
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- vai qui: https://www.oraclerecipes.com/monitoring/find-blocking-sessions/ | |
COLUMN username FORMAT a10 HEADING 'Holding|User' | |
COLUMN session_id HEADING 'SID' | |
COLUMN mode_held FORMAT a20 HEADING 'Mode|Held' | |
COLUMN mode_requested FORMAT a20 HEADING 'Mode|Requested' | |
COLUMN lock_id1 FORMAT a20 HEADING 'Lock|ID1' | |
COLUMN lock_id2 FORMAT a20 HEADING 'Lock|ID2' | |
COLUMN type HEADING 'Lock|Type' | |
SET LINES 132 PAGES 59 FEEDBACK OFF ECHO OFF | |
TTITLE left _date center 'Sessions Blocking Other Sessions Report' skip 2 | |
SELECT a.session_id, username, TYPE, mode_held, mode_requested, lock_id1, | |
lock_id2 | |
FROM v$session b, dba_blockers c, dba_locks a | |
WHERE c.holding_session = a.session_id AND c.holding_session = b.sid | |
/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment