Vous êtes sur la page 1sur 1

The following query may give you the list of running SQL ( SQL_ID ) from Active Sessions:

select inst_id, program, module, SQL_ID, machine


from gv$session
where type!='BACKGROUND'
and status='ACTIVE'
and sql_id is not null;
Then, from other Views like v$sqltext you may have the SQL statement for the SQL_ID you
got with the above query.

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;

Vous aimerez peut-être aussi