Q
Manage Learn to apply best practices and optimize your operations.

How to find which stored procedure is currently running

How can I find out which stored procedure is currently running for a session?

The answer is to really find out which SQL statement a session is currently running. Stored procedures will appear as an SQL statement. To do this, we'll use the following query:

SELECT a.sqltext
FROM v$session s, v$sqlarea a
WHERE s.sql_address = a.addr
  AND s.sql_hash_value = a.hash_value
  AND s.username='MYUSER';

For More Information


In my example, I limited this to just queries issued by MYUSER. But you can do other limitations on the V$SESSION view as well.

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close