Viewing the currently executing SQL in Oracle 11 December 2006 at 00:00
Sometimes if you are having a performance problem you might want to know what SQL statements are being run - you can trawl through these to work out what is causing the problem. The v$sql table can be used to view all queries that are being run.

SELECT   
      module, last_load_time, 
      last_active_time, sql_text
FROM  v$sql 
WHERE UPPER(sql_text) LIKE '%SELECT%'  
AND   module = 'aspnet_wp.exe'
AND   UPPER(sql_text) NOT LIKE '%FROM V$SQL%'
ORDER BY last_load_time DESC, module