select sesion.sid, sesion.username, optimizer_mode, hash_value, address, cpu_time, elapsed_time, sql_text, serial# from v$sqlarea sqlarea, v$session sesion where sesion.sql_hash_value = sqlarea.hash_value and sesion.sql_address = sqlarea.address and sesion.username is not null
Si
jamais il y a des requêtes qui font plus de 1000 caractères, elles
seront tronqués. Dans ce cas, pour afficher l'integralité :
select sesion.sid,
sql_text
from v$sqltext sqltext, v$session sesion
where sesion.sql_hash_value = sqltext.hash_value
and sesion.sql_address = sqltext.address
and sesion.username is not null
order by sqltext.piece
Source: http://www.squaredba.com/finding-currently-running-sql-135.html
Aucun commentaire:
Enregistrer un commentaire