MERCADOS FINANCIEROS

viernes, 27 de marzo de 2020

JOIN V$SESSION TO V$SQL

SELECT OSUSER, SERIAL#, SID, executions, sql.SQL_ID ,sql.child_number, SQL_TEXT
FROM V$SESSION sess JOIN V$SQL sql
on  (sess.SQL_ADDRESS = sql.ADDRESS)
where sess.STATUS = 'ACTIVE'


PARA ANALIZAR BLOQUEOS

SELECT OSUSER, SERIAL#, SID, executions, sql.SQL_ID ,sql.child_number, SQL_TEXT
FROM V$SESSION sess JOIN V$SQL sql
on  (sess.SQL_ADDRESS = sql.ADDRESS)
where sid in (select blocking_session from v$session)
and sess.STATUS = 'ACTIVE'

No hay comentarios: