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.
oracle
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.
Best Answer
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.