How can you show the SQL that is currently executing on an oracle db?
Extra information that would be useful would include user, session id etc.
|
|
|
Most of the info is available in v$session ... and the SQL Text can be grabbed from v$sql or v$sqltext_with_newlines... Here is a query that I often use that formats In-flight SQL, longest running at top.
|
|||||||||||||||
|
|
Good answer found here. Log in as sysdba:
And execute the following sql:
If the output is unreadable, change the LINESIZE (take from here):
|
|||
|
|