Search

Database locks

select /*+ ORDERED */ w.session_id waiting_session,

h.session_id holding_session,

w.lock_type,

h.mode_held,

w.mode_requested,

w.lock_id1,

w.lock_id2

from sys.dba_lock w, sys.dba_lock h

where

(((h.mode_held != 'None') and (h.mode_held != 'Null')

and ((h.mode_requested = 'None') or (h.mode_requested = 'Null')))

and

(((w.mode_held = 'None') or (w.mode_held = 'Null'))

and ((w.mode_requested != 'None') and (w.mode_requested != 'Null'))))

and w.lock_type = h.lock_type

and w.lock_id1 = h.lock_id1

and w.lock_id2 = h.lock_id2

and w.session_id != h.session_id


2 views0 comments

Recent Posts

See All

After logon trigger - trace user sessions

-- Activate trace for sessions using after logon database trigger -- -- Tables: -- -- SYS.XX_LOGIN_TRACE_CONDITION - add here the conditions for activating trace -- SYS.XX_LOGIN_TRACED_SESSIONS - con

INCLUDE parameter of expdp

-- Export all public database links expdp user/password full=y \ include=db_link:"in (select db_link from dba_db_links where owner = 'PUBLIC')" -- Export one table expdp user/password include=table:"i

Multiplexing Redo Log and Control files

-- List redo log files select group#, member from v$logfile order by group#, member; -- Check redo log file status select group#, members, status from v$log; -- Adding redo log file to a group alter d